added observeAndDo to thrift