Skip to content

Commit ecb5dfd

Browse files
keep unknown_response attribute in legacy path
1 parent d1c60ae commit ecb5dfd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sentry_sdk/integrations/anthropic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,8 @@ def _sentry_patched_create_sync(f: "Any", *args: "Any", **kwargs: "Any") -> "Any
708708
response_id=getattr(result, "id", None),
709709
finish_reason=getattr(result, "stop_reason", None),
710710
)
711+
elif not span_streaming:
712+
span.set_data("unknown_response", True)
711713

712714
span.__exit__(None, None, None)
713715

@@ -804,6 +806,8 @@ async def _sentry_patched_create_async(
804806
response_id=getattr(result, "id", None),
805807
finish_reason=getattr(result, "stop_reason", None),
806808
)
809+
elif not span_streaming:
810+
span.set_data("unknown_response", True)
807811

808812
span.__exit__(None, None, None)
809813

0 commit comments

Comments
 (0)