Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions opentelemetry-api/src/opentelemetry/trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_span_context(self) -> "SpanContext":

@abc.abstractmethod
def set_attributes(
self, attributes: typing.Dict[str, types.AttributeValue]
self, attributes: typing.Mapping[str, types.AttributeValue]
) -> None:
"""Sets Attributes.

Expand Down Expand Up @@ -529,7 +529,7 @@ def end(self, end_time: typing.Optional[int] = None) -> None:
pass

def set_attributes(
self, attributes: typing.Dict[str, types.AttributeValue]
self, attributes: typing.Mapping[str, types.AttributeValue]
) -> None:
pass

Expand Down
3 changes: 2 additions & 1 deletion opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
Dict,
Iterator,
List,
Mapping,
MutableMapping,
Optional,
Sequence,
Expand Down Expand Up @@ -842,7 +843,7 @@ def get_span_context(self):
return self._context

def set_attributes(
self, attributes: Dict[str, types.AttributeValue]
self, attributes: Mapping[str, types.AttributeValue]
) -> None:
with self._lock:
if self._end_time is not None:
Expand Down
Loading