From e654d73f30208fac94323bd0ef78c7dbe3f24f2a Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 15 Aug 2023 15:11:45 -0500 Subject: [PATCH] fix: in_span performance (#1514) --- api/lib/opentelemetry/trace/tracer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/lib/opentelemetry/trace/tracer.rb b/api/lib/opentelemetry/trace/tracer.rb index 3545c432f..dc79629f7 100644 --- a/api/lib/opentelemetry/trace/tracer.rb +++ b/api/lib/opentelemetry/trace/tracer.rb @@ -31,7 +31,7 @@ class Tracer # # @yield [span, context] yields the newly created span and a context containing the # span to the block. - def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil, &block) + def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil) span = nil span = start_span(name, attributes: attributes, links: links, start_timestamp: start_timestamp, kind: kind) Trace.with_span(span) { |s, c| yield s, c }