Skip to content

Commit

Permalink
Merge branch 'master' into szokeasaurusrex/last_event_id
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed May 10, 2024
2 parents 751f6ca + 2cdc635 commit b63d2bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions sentry_sdk/integrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def iter_default_integrations(with_auto_enabling_integrations):

_AUTO_ENABLING_INTEGRATIONS = [
"sentry_sdk.integrations.aiohttp.AioHttpIntegration",
"sentry_sdk.integrations.anthropic.AnthropicIntegration",
"sentry_sdk.integrations.ariadne.AriadneIntegration",
"sentry_sdk.integrations.arq.ArqIntegration",
"sentry_sdk.integrations.asyncpg.AsyncPGIntegration",
Expand Down
12 changes: 9 additions & 3 deletions sentry_sdk/integrations/anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@
package_version,
)

from anthropic.resources import Messages

from typing import TYPE_CHECKING

try:
from anthropic.resources import Messages

if TYPE_CHECKING:
from anthropic.types import MessageStreamEvent
except ImportError:
raise DidNotEnable("Anthropic not installed")


if TYPE_CHECKING:
from typing import Any, Iterator
from anthropic.types import MessageStreamEvent
from sentry_sdk.tracing import Span


Expand Down

0 comments on commit b63d2bc

Please sign in to comment.