Skip to content

Commit 0a6bb4f

Browse files
authored
Merge branch 'main' into fix/fix-id-generator
2 parents de0cc5b + 59b225f commit 0a6bb4f

File tree

2 files changed

+4
-3
lines changed
  • opentelemetry-api/src/opentelemetry/trace
  • opentelemetry-sdk/src/opentelemetry/sdk/trace

2 files changed

+4
-3
lines changed

opentelemetry-api/src/opentelemetry/trace/span.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def get_span_context(self) -> "SpanContext":
7979

8080
@abc.abstractmethod
8181
def set_attributes(
82-
self, attributes: typing.Dict[str, types.AttributeValue]
82+
self, attributes: typing.Mapping[str, types.AttributeValue]
8383
) -> None:
8484
"""Sets Attributes.
8585
@@ -529,7 +529,7 @@ def end(self, end_time: typing.Optional[int] = None) -> None:
529529
pass
530530

531531
def set_attributes(
532-
self, attributes: typing.Dict[str, types.AttributeValue]
532+
self, attributes: typing.Mapping[str, types.AttributeValue]
533533
) -> None:
534534
pass
535535

opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
Dict,
3131
Iterator,
3232
List,
33+
Mapping,
3334
MutableMapping,
3435
Optional,
3536
Sequence,
@@ -842,7 +843,7 @@ def get_span_context(self):
842843
return self._context
843844

844845
def set_attributes(
845-
self, attributes: Dict[str, types.AttributeValue]
846+
self, attributes: Mapping[str, types.AttributeValue]
846847
) -> None:
847848
with self._lock:
848849
if self._end_time is not None:

0 commit comments

Comments
 (0)