We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8025537 commit 08c1c23Copy full SHA for 08c1c23
sentry_sdk/integrations/cohere.py
@@ -113,7 +113,10 @@ def collect_chat_response_fields(
113
114
for attr, spandata_key in COLLECTED_CHAT_RESP_ATTRS.items():
115
if hasattr(res, attr):
116
- set_data_normalized(span, spandata_key, getattr(res, attr))
+ value = getattr(res, attr)
117
+ if spandata_key == SPANDATA.GEN_AI_RESPONSE_FINISH_REASONS:
118
+ value = [value]
119
+ set_data_normalized(span, spandata_key, value)
120
121
if hasattr(res, "meta"):
122
if hasattr(res.meta, "billed_units"):
0 commit comments