}
}
-void Tracer::shutdown() {
- if (tracer) {
- tracer->CloseWithMicroseconds(1);
- }
-}
-
jspan Tracer::start_trace(opentelemetry::nostd::string_view trace_name) {
if (is_enabled()) {
return tracer->StartSpan(trace_name);
Tracer(opentelemetry::nostd::string_view service_name);
void init(opentelemetry::nostd::string_view service_name);
- void shutdown();
bool is_enabled() const;
// creates and returns a new span with `trace_name`
jspan add_span(std::string_view, const jspan&) { return {}; }
jspan add_span(std::string_view span_name, const jspan_context& parent_ctx) { return {}; }
void init(std::string_view service_name) {}
- void shutdown() {}
};
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) {}
utime_t duration = ceph_clock_now() - start_time_func;
dout(0) <<"Slow Shutdown duration:" << duration << " seconds" << dendl;
- tracing::osd::tracer.shutdown();
return r;
}
derr << "ERROR: unable to initialize rgw tools" << dendl;
return -r;
}
-
+ tracing::rgw::tracer.init("rgw");
rgw_init_resolver();
rgw::curl::setup_curl(fe_map);
rgw_http_client_init(g_ceph_context);
namespace tracing {
namespace rgw {
-#ifdef HAVE_JAEGER
-thread_local tracing::Tracer tracer("rgw");
-#else // !HAVE_JAEGER
tracing::Tracer tracer;
-#endif
} // namespace rgw
} // namespace tracing
const auto REQUEST = "request";
const auto MULTIPART = "multipart_upload ";
-#ifdef HAVE_JAEGER
-extern thread_local tracing::Tracer tracer;
-#else
extern tracing::Tracer tracer;
-#endif
} // namespace rgw
} // namespace tracing