Skip to content

Commit c29c0be

Browse files
committed
fix: copy tags dict before deleting span.kind to avoid caller mutation
1 parent e50a246 commit c29c0be

File tree

1 file changed

+1
-0
lines changed
  • shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim

1 file changed

+1
-0
lines changed

shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ def start_span(
676676
mapped_kind = util.opentracing_kind_to_otel_kind(tags["span.kind"])
677677
if mapped_kind is not None:
678678
kind = mapped_kind
679+
tags = dict(tags)
679680
del tags["span.kind"]
680681

681682
# The OpenTracing API expects time values to be `float` values which

0 commit comments

Comments
 (0)