From abbd359a03d33e8dc931e05aed89a0a7ec077e59 Mon Sep 17 00:00:00 2001 From: Robert Laurin Date: Tue, 15 Aug 2023 14:46:56 -0500 Subject: [PATCH] fix: in_span performance --- 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 3545c432fe..dc79629f73 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 }