Skip to content

Commit 98c8d42

Browse files
committed
.
1 parent 5068c5b commit 98c8d42

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sentry_sdk/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,5 +498,4 @@ def update_current_span(op=None, name=None, attributes=None):
498498
current_span.description = name
499499

500500
if attributes is not None:
501-
for key, value in attributes.items():
502-
current_span.set_data(key, value)
501+
current_span.set_data(attributes)

sentry_sdk/tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def set_data(self, key, value=None):
611611
# Dictionary calling pattern: set_data({"key": "value"})
612612
for k, v in key.items():
613613
self._data[k] = v
614-
else:
614+
elif isinstance(key, str):
615615
# Traditional calling pattern: set_data(key, value)
616616
if value is None:
617617
raise ValueError("Value must be provided when key is a string")

0 commit comments

Comments
 (0)