Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sentry_sdk/integrations/litestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)
from sentry_sdk.integrations.asgi import SentryAsgiMiddleware
from sentry_sdk.integrations.logging import ignore_logger_for_events
from sentry_sdk.traces import SOURCE_FOR_STYLE, SegmentNameSource
from sentry_sdk.traces import SegmentNameSource
from sentry_sdk.utils import (
ensure_integration_enabled,
event_from_exception,
Expand Down Expand Up @@ -265,7 +265,7 @@ async def handle_wrapper(
if func is not None:
name = transaction_from_function(func)

source = SOURCE_FOR_STYLE["endpoint"]
source = SegmentNameSource.COMPONENT

if not name:
name = _DEFAULT_TRANSACTION_NAME
Expand Down
4 changes: 2 additions & 2 deletions sentry_sdk/integrations/starlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from sentry_sdk.data_collection import _apply_key_value_collection_filtering
from sentry_sdk.integrations import DidNotEnable, Integration, _check_minimum_version
from sentry_sdk.integrations.asgi import SentryAsgiMiddleware
from sentry_sdk.traces import SOURCE_FOR_STYLE, SegmentNameSource
from sentry_sdk.traces import SegmentNameSource
from sentry_sdk.utils import (
ensure_integration_enabled,
event_from_exception,
Expand Down Expand Up @@ -240,7 +240,7 @@ async def handle_wrapper(
if func is not None:
name = transaction_from_function(func)

source = SOURCE_FOR_STYLE["endpoint"]
source = SegmentNameSource.COMPONENT

if not name:
name = _DEFAULT_TRANSACTION_NAME
Expand Down
13 changes: 0 additions & 13 deletions sentry_sdk/traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,6 @@ def __str__(self) -> str:
]


SOURCE_FOR_STYLE = {
"endpoint": SegmentNameSource.COMPONENT,
"function_name": SegmentNameSource.COMPONENT,
"handler_name": SegmentNameSource.COMPONENT,
"method_and_path_pattern": SegmentNameSource.ROUTE,
"path": SegmentNameSource.URL,
"route_name": SegmentNameSource.COMPONENT,
"route_pattern": SegmentNameSource.ROUTE,
"uri_template": SegmentNameSource.ROUTE,
"url": SegmentNameSource.ROUTE,
}


# Sentinel value for an unset parent_span to be able to distinguish it from
# a None set by the user
_DEFAULT_PARENT_SPAN = object()
Expand Down
Loading