lib/opentelemetry/sdk/trace/tracer_provider.rb in opentelemetry-sdk-1.3.1 vs lib/opentelemetry/sdk/trace/tracer_provider.rb in opentelemetry-sdk-1.3.2
- old
+ new
@@ -139,10 +139,10 @@
result = @sampler.should_sample?(trace_id: trace_id, parent_context: parent_context, links: links, name: name, kind: kind, attributes: attributes)
span_id = @id_generator.generate_span_id
if result.recording? && !@stopped
trace_flags = result.sampled? ? OpenTelemetry::Trace::TraceFlags::SAMPLED : OpenTelemetry::Trace::TraceFlags::DEFAULT
context = OpenTelemetry::Trace::SpanContext.new(trace_id: trace_id, span_id: span_id, trace_flags: trace_flags, tracestate: result.tracestate)
- attributes = attributes&.merge(result.attributes) || result.attributes
+ attributes = attributes&.merge(result.attributes) || result.attributes.dup
Span.new(
context,
parent_context,
parent_span,
name,