Skip to content

Commit cd71e10

Browse files
committed
Correctly yield f, args, kwargs
1 parent 99387d5 commit cd71e10

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sentry_sdk/integrations/anthropic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def _sentry_patched_create_common(f, *args, **kwargs):
9696
span.__enter__()
9797

9898
try:
99-
result = yield f(*args, **kwargs)
99+
result = yield f, args, kwargs
100100
except Exception as exc:
101101
_capture_exception(exc)
102102
span.__exit__(None, None, None)

sentry_sdk/integrations/openai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _new_chat_completion_common(f, *args, **kwargs):
136136
)
137137
span.__enter__()
138138
try:
139-
res = yield f(*args, **kwargs)
139+
res = yield f, args, kwargs
140140
except Exception as e:
141141
_capture_exception(e)
142142
span.__exit__(None, None, None)
@@ -264,7 +264,7 @@ def _new_embeddings_create_common(f, *args, **kwargs):
264264
if "model" in kwargs:
265265
set_data_normalized(span, "ai.model_id", kwargs["model"])
266266
try:
267-
response = yield f(*args, **kwargs)
267+
response = yield f, args, kwargs
268268
except Exception as e:
269269
_capture_exception(e)
270270
raise e from None

0 commit comments

Comments
 (0)