Skip to content

Commit fa60e8a

Browse files
chore: Deprecate ai_track
1 parent 10b4f5b commit fa60e8a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sentry_sdk/ai/monitoring.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import inspect
22
import sys
3+
import warnings
34
from functools import wraps
45
from typing import TYPE_CHECKING
56

@@ -29,6 +30,13 @@ def get_ai_pipeline_name() -> "Optional[str]":
2930

3031

3132
def ai_track(description: str, **span_kwargs: "Any") -> "Callable[[F], F]":
33+
warnings.warn(
34+
"sentry_sdk.ai.ai_track is deprecated and will be removed in version 3.0 of sentry-sdk."
35+
"Use the manual span API instead, e.g. sentry_sdk.start_span().",
36+
DeprecationWarning,
37+
stacklevel=2,
38+
)
39+
3240
def decorator(f: "F") -> "F":
3341
def sync_wrapped(*args: "Any", **kwargs: "Any") -> "Any":
3442
client = sentry_sdk.get_client()

0 commit comments

Comments
 (0)