Skip to content

Commit 6aec4fb

Browse files
committed
Remove logging from asgi
1 parent a163f83 commit 6aec4fb

File tree

3 files changed

+1
-30
lines changed

3 files changed

+1
-30
lines changed

sentry_sdk/integrations/asgi.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -223,28 +223,16 @@ async def _run_app(self, scope, receive, send, asgi_version):
223223
source=transaction_source,
224224
origin=self.span_origin,
225225
)
226-
logger.debug(
227-
"[ASGI] Created transaction (continuing trace): %s",
228-
transaction,
229-
)
230226
else:
231227
transaction = Transaction(
232228
op=OP.HTTP_SERVER,
233229
name=transaction_name,
234230
source=transaction_source,
235231
origin=self.span_origin,
236232
)
237-
logger.debug(
238-
"[ASGI] Created transaction (new): %s", transaction
239-
)
240233

241234
if transaction:
242235
transaction.set_tag("asgi.type", ty)
243-
logger.debug(
244-
"[ASGI] Set transaction name and source on transaction: '%s' / '%s'",
245-
transaction.name,
246-
transaction.source,
247-
)
248236

249237
with (
250238
sentry_sdk.start_transaction(
@@ -254,7 +242,6 @@ async def _run_app(self, scope, receive, send, asgi_version):
254242
if transaction is not None
255243
else nullcontext()
256244
):
257-
logger.debug("[ASGI] Started transaction: %s", transaction)
258245
try:
259246

260247
async def _sentry_wrapped_send(event):
@@ -309,12 +296,6 @@ def event_processor(self, event, hint, asgi_scope):
309296
event["transaction"] = name
310297
event["transaction_info"] = {"source": source}
311298

312-
logger.debug(
313-
"[ASGI] Set transaction name and source in event_processor: '%s' / '%s'",
314-
event["transaction"],
315-
event["transaction_info"]["source"],
316-
)
317-
318299
return event
319300

320301
# Helper functions.

sentry_sdk/integrations/fastapi.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
from sentry_sdk.integrations import DidNotEnable
77
from sentry_sdk.scope import should_send_default_pii
88
from sentry_sdk.tracing import SOURCE_FOR_STYLE, TransactionSource
9-
from sentry_sdk.utils import (
10-
transaction_from_function,
11-
logger,
12-
)
9+
from sentry_sdk.utils import transaction_from_function
1310

1411
from typing import TYPE_CHECKING
1512

@@ -66,9 +63,6 @@ def _set_transaction_name_and_source(scope, transaction_style, request):
6663
source = SOURCE_FOR_STYLE[transaction_style]
6764

6865
scope.set_transaction_name(name, source=source)
69-
logger.debug(
70-
"[FastAPI] Set transaction name and source on scope: %s / %s", name, source
71-
)
7266

7367

7468
def patch_get_request_handler():

sentry_sdk/integrations/starlette.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
capture_internal_exceptions,
3030
ensure_integration_enabled,
3131
event_from_exception,
32-
logger,
3332
parse_version,
3433
transaction_from_function,
3534
)
@@ -723,9 +722,6 @@ def _set_transaction_name_and_source(scope, transaction_style, request):
723722
source = TransactionSource.ROUTE
724723

725724
scope.set_transaction_name(name, source=source)
726-
logger.debug(
727-
"[Starlette] Set transaction name and source on scope: %s / %s", name, source
728-
)
729725

730726

731727
def _get_transaction_from_middleware(app, asgi_scope, integration):

0 commit comments

Comments
 (0)