| 1035 | } |
| 1036 | |
| 1037 | void 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 | |
| 1063 | void Message::encode_otel_trace(ceph::bufferlist &bl, uint64_t features) const |
| 1064 | { |
nothing calls this directly
no test coverage detected