lib/opentelemetry/sdk/trace/tracer.rb in opentelemetry-sdk-1.0.1 vs lib/opentelemetry/sdk/trace/tracer.rb in opentelemetry-sdk-1.0.2
- old
+ new
@@ -29,15 +29,17 @@
def start_span(name, with_parent: nil, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
name ||= 'empty'
with_parent ||= Context.current
+ parent_span = OpenTelemetry::Trace.current_span(with_parent)
parent_span_context = OpenTelemetry::Trace.current_span(with_parent).context
if parent_span_context.valid?
parent_span_id = parent_span_context.span_id
trace_id = parent_span_context.trace_id
end
- @tracer_provider.internal_create_span(name, kind, trace_id, parent_span_id, attributes, links, start_timestamp, with_parent, @instrumentation_library)
+
+ @tracer_provider.internal_create_span(name, kind, trace_id, parent_span_id, attributes, links, start_timestamp, with_parent, parent_span, @instrumentation_library)
end
end
end
end
end