File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ def iter_default_integrations(with_auto_enabling_integrations):
6969
7070_AUTO_ENABLING_INTEGRATIONS = [
7171 "sentry_sdk.integrations.aiohttp.AioHttpIntegration" ,
72+ "sentry_sdk.integrations.anthropic.AnthropicIntegration" ,
7273 "sentry_sdk.integrations.ariadne.AriadneIntegration" ,
7374 "sentry_sdk.integrations.arq.ArqIntegration" ,
7475 "sentry_sdk.integrations.asyncpg.AsyncPGIntegration" ,
Original file line number Diff line number Diff line change 1212 package_version ,
1313)
1414
15- from anthropic .resources import Messages
16-
1715from typing import TYPE_CHECKING
1816
17+ try :
18+ from anthropic .resources import Messages
19+
20+ if TYPE_CHECKING :
21+ from anthropic .types import MessageStreamEvent
22+ except ImportError :
23+ raise DidNotEnable ("Anthropic not installed" )
24+
25+
1926if TYPE_CHECKING :
2027 from typing import Any , Iterator
21- from anthropic .types import MessageStreamEvent
2228 from sentry_sdk .tracing import Span
2329
2430
You can’t perform that action at this time.
0 commit comments