Skip to content

Commit 94796c6

Browse files
committed
make attribute a string
1 parent d8b5838 commit 94796c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sentry_sdk/tracing_utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,11 @@ def _get_input_attributes(template, send_pii, args, kwargs):
918918
elif key == "top_k" and isinstance(value, int):
919919
attributes[SPANDATA.GEN_AI_REQUEST_TOP_K] = value
920920

921+
if SPANDATA.GEN_AI_REQUEST_MESSAGES in attributes:
922+
attributes[SPANDATA.GEN_AI_REQUEST_MESSAGES] = safe_repr(
923+
attributes[SPANDATA.GEN_AI_REQUEST_MESSAGES]
924+
)
925+
921926
if template == SpanTemplate.AI_TOOL:
922927
if send_pii:
923928
attributes[SPANDATA.GEN_AI_TOOL_INPUT] = safe_repr(

0 commit comments

Comments
 (0)