summaryrefslogtreecommitdiffstats
path: root/src/msg/Messenger.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/msg/Messenger.h')
-rw-r--r--src/msg/Messenger.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/msg/Messenger.h b/src/msg/Messenger.h
index c4df379939a..a186ec3c875 100644
--- a/src/msg/Messenger.h
+++ b/src/msg/Messenger.h
@@ -41,6 +41,10 @@ class Messenger {
private:
list<Dispatcher*> dispatchers;
list <Dispatcher*> fast_dispatchers;
+ ZTracer::Endpoint trace_endpoint;
+
+ void set_endpoint_addr(const entity_addr_t& a,
+ const entity_name_t &name);
protected:
/// the "name" of the local daemon. eg client.99
@@ -136,7 +140,8 @@ public:
* or use the create() function.
*/
Messenger(CephContext *cct_, entity_name_t w)
- : my_inst(),
+ : trace_endpoint("0.0.0.0", 0, "Messenger"),
+ my_inst(),
default_send_priority(CEPH_MSG_PRIO_DEFAULT), started(false),
magic(0),
socket_priority(-1),
@@ -213,9 +218,19 @@ protected:
/**
* set messenger's address
*/
- virtual void set_myaddr(const entity_addr_t& a) { my_inst.addr = a; }
+ virtual void set_myaddr(const entity_addr_t& a) {
+ my_inst.addr = a;
+ set_endpoint_addr(a, my_inst.name);
+ }
public:
/**
+ * @return the zipkin trace endpoint
+ */
+ const ZTracer::Endpoint* get_trace_endpoint() const {
+ return &trace_endpoint;
+ }
+
+ /**
* Retrieve the Messenger's name.
*
* @return A const reference to the name this Messenger