Skip to content

Commit d48c85f

Browse files
add aembedding
1 parent 017f854 commit d48c85f

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

sentry_sdk/integrations/litellm.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _input_callback(kwargs: "Dict[str, Any]") -> None:
8282
provider = "unknown"
8383

8484
call_type = kwargs.get("call_type", None)
85-
if call_type == "embedding":
85+
if call_type == "embedding" or call_type == "aembedding":
8686
operation = "embeddings"
8787
else:
8888
operation = "chat"
@@ -283,20 +283,6 @@ def _failure_callback(
283283
span.__exit__(type(exception), exception, None)
284284

285285

286-
async def _async_failure_callback(
287-
kwargs: "Dict[str, Any]",
288-
exception: Exception,
289-
start_time: "datetime",
290-
end_time: "datetime",
291-
) -> None:
292-
return _failure_callback(
293-
kwargs,
294-
exception,
295-
start_time,
296-
end_time,
297-
)
298-
299-
300286
class LiteLLMIntegration(Integration):
301287
"""
302288
LiteLLM integration for Sentry.
@@ -366,5 +352,3 @@ def setup_once() -> None:
366352
litellm.failure_callback = failure_callback or []
367353
if _failure_callback not in litellm.failure_callback:
368354
litellm.failure_callback.append(_failure_callback)
369-
if _async_failure_callback not in litellm.failure_callback:
370-
litellm.failure_callback.append(_async_failure_callback)

0 commit comments

Comments
 (0)