Skip to content

Commit ed58b98

Browse files
stasspumer
authored andcommitted
fix: moved out sentry integration import from root of contrib package
1 parent 0b9b024 commit ed58b98

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

fastapi_jsonrpc/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,9 @@ def _enter_sentry_scope(self):
655655
return
656656

657657
warnings.warn(
658-
"You are using implicit sentry integration. This feature might be removed in a future major release."
659-
"Use explicit `FastApiJsonRPCIntegration` with sentry-sdk 2.* instead.",
658+
"Implicit Sentry integration is deprecated and may be removed in a future major release. "
659+
"To ensure compatibility, use sentry-sdk 2.* and explicit integration:"
660+
"`from fastapi_jsonrpc.contrib.sentry import FastApiJsonRPCIntegration`. "
660661
)
661662
with sentry_new_scope() as scope:
662663
# Actually we can use set_transaction_name
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
from .sentry import TransactionNameGenerator, FastApiJsonRPCIntegration, jrpc_transaction_middleware
2-
3-
__all__ = [
4-
"FastApiJsonRPCIntegration",
5-
"TransactionNameGenerator",
6-
"jrpc_transaction_middleware",
7-
]

tests/sentry/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from sentry_sdk.envelope import Envelope
55
from sentry_sdk.integrations.starlette import StarletteIntegration
66
from sentry_sdk.integrations.fastapi import FastApiIntegration
7-
from fastapi_jsonrpc.contrib import FastApiJsonRPCIntegration
7+
from fastapi_jsonrpc.contrib.sentry import FastApiJsonRPCIntegration
88

99

1010
@pytest.fixture

0 commit comments

Comments
 (0)