MCPcopy Create free account
hub / github.com/ceph/ceph / decode_trace

Method decode_trace

src/msg/Message.cc:1037–1061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1035}
1036
1037void Message::decode_trace(ceph::bufferlist::const_iterator &p, bool create)
1038{
1039 blkin_trace_info info = {};
1040 decode(info, p);
1041
1042#ifdef WITH_BLKIN
1043 if (!connection)
1044 return;
1045
1046 const auto msgr = connection->get_messenger();
1047 const auto endpoint = msgr->get_trace_endpoint();
1048 if (info.trace_id) {
1049 trace.init(get_type_name().data(), endpoint, &info, true);
1050 trace.event("decoded trace");
1051 } else if (create || (msgr->get_myname().is_osd() &&
1052 msgr->cct->_conf->osd_blkin_trace_all)) {
1053 // create a trace even if we didn't get one on the wire
1054 trace.init(get_type_name().data(), endpoint);
1055 trace.event("created trace");
1056 }
1057 trace.keyval("tid", get_tid());
1058 trace.keyval("entity type", get_source().type_str());
1059 trace.keyval("entity num", get_source().num());
1060#endif
1061}
1062
1063void Message::encode_otel_trace(ceph::bufferlist &bl, uint64_t features) const
1064{

Callers

nothing calls this directly

Calls 11

get_trace_endpointMethod · 0.80
get_mynameMethod · 0.80
keyvalMethod · 0.80
decodeFunction · 0.70
get_messengerMethod · 0.45
initMethod · 0.45
dataMethod · 0.45
eventMethod · 0.45
is_osdMethod · 0.45
type_strMethod · 0.45
numMethod · 0.45

Tested by

no test coverage detected