Skip to content

Commit f668921

Browse files
committed
better if
1 parent 89a0f46 commit f668921

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sentry_sdk/ai/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def _normalize_data(data):
3030
def set_data_normalized(span, key, value):
3131
# type: (Span, str, Any) -> None
3232
normalized = _normalize_data(value)
33-
if isinstance(normalized, (list, dict, tuple)):
34-
# only primitive types allowed
35-
span.set_data(key, str(normalized))
36-
else:
33+
if isinstance(normalized, (int, float, bool, str)):
3734
span.set_data(key, normalized)
35+
else:
36+
span.set_data(key, str(normalized))

0 commit comments

Comments
 (0)