Skip to content

Commit 27c851d

Browse files
committed
better format of dict in span data
1 parent d43d17f commit 27c851d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sentry_sdk/ai/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import json
2+
13
from typing import TYPE_CHECKING
24

35
if TYPE_CHECKING:
@@ -33,4 +35,4 @@ def set_data_normalized(span, key, value, unpack=True):
3335
if isinstance(normalized, (int, float, bool, str)):
3436
span.set_data(key, normalized)
3537
else:
36-
span.set_data(key, str(normalized))
38+
span.set_data(key, json.dumps(normalized))

0 commit comments

Comments
 (0)