Merge pull request #51331 from Matan-B/wip-matanb-revert-51043

Revert "common/tracer: fix decoding when jaeger tracing is disabled"

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
This commit is contained in:
Ilya Dryomov 2023-05-03 12:28:17 +02:00 committed by GitHub
commit ac7bba5d6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,21 +100,8 @@ struct Tracer {
jspan add_span(std::string_view span_name, const jspan_context& parent_ctx) { return {}; }
void init(std::string_view service_name) {}
};
inline void encode(const jspan_context& span_ctx, bufferlist& bl, uint64_t f = 0) {
ENCODE_START(1, 1, bl);
// jaeger is missing, set "is_valid" to false.
bool is_valid = false;
encode(is_valid, bl);
ENCODE_FINISH(bl);
inline void encode(const jspan_context& span, bufferlist& bl, uint64_t f=0) {}
inline void decode(jspan_context& span_ctx, ceph::buffer::list::const_iterator& bl) {}
}
inline void decode(jspan_context& span_ctx, bufferlist::const_iterator& bl) {
DECODE_START(254, bl);
// jaeger is missing, consume the buffer but do not decode it.
DECODE_FINISH(bl);
}
} // namespace tracing
#endif // !HAVE_JAEGER