File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,7 @@ jspan Tracer::start_trace(opentelemetry::nostd::string_view trace_name, bool tra
6060}
6161
6262jspan Tracer::add_span (opentelemetry::nostd::string_view span_name, const jspan& parent_span) {
63- ceph_assert (cct);
64- if (is_enabled () && parent_span->IsRecording ()) {
63+ if (parent_span && parent_span->IsRecording ()) {
6564 ceph_assert (tracer);
6665 opentelemetry::trace::StartSpanOptions span_opts;
6766 span_opts.parent = parent_span->GetContext ();
@@ -72,8 +71,7 @@ jspan Tracer::add_span(opentelemetry::nostd::string_view span_name, const jspan&
7271}
7372
7473jspan Tracer::add_span (opentelemetry::nostd::string_view span_name, const jspan_context& parent_ctx) {
75- ceph_assert (cct);
76- if (is_enabled () && parent_ctx.IsValid ()) {
74+ if (parent_ctx.IsValid ()) {
7775 ceph_assert (tracer);
7876 opentelemetry::trace::StartSpanOptions span_opts;
7977 span_opts.parent = parent_ctx;
You can’t perform that action at this time.
0 commit comments