lib/opentelemetry/sdk/trace/tracer.rb in opentelemetry-sdk-1.2.0 vs lib/opentelemetry/sdk/trace/tracer.rb in opentelemetry-sdk-1.2.1
- old
+ new
@@ -26,12 +26,14 @@
def start_root_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
start_span(name, with_parent: Context.empty, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind)
end
def start_span(name, with_parent: nil, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
+ with_parent ||= Context.current
+ return super(name, with_parent: with_parent, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind) if Common::Utilities.untraced?(with_parent)
+
name ||= 'empty'
kind ||= :internal
- with_parent ||= Context.current
@tracer_provider.internal_start_span(name, kind, attributes, links, start_timestamp, with_parent, @instrumentation_scope)
end
end
end