Skip to content
Open
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
27 changes: 4 additions & 23 deletions sentry_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,19 @@
from sentry_sdk._init_implementation import init
from sentry_sdk.consts import INSTRUMENTER
from sentry_sdk.scope import Scope, _ScopeManager, new_scope, isolation_scope
from sentry_sdk.tracing import NoOpSpan, Transaction, trace
from sentry_sdk.tracing import trace
from sentry_sdk.crons import monitor

from typing import TYPE_CHECKING

_scope_get_current_scope = Scope.get_current_scope

if TYPE_CHECKING:
from collections.abc import Mapping

from typing import Any
from typing import Dict
from typing import Generator
from typing import Optional
from typing import overload
from typing import Callable
from typing import TypeVar
from typing import ContextManager
from typing import Union

from typing_extensions import Unpack

from sentry_sdk.client import BaseClient
from sentry_sdk._types import (
Event,
Hint,
Breadcrumb,
BreadcrumbHint,
ExcInfo,
MeasurementUnit,
LogLevelStr,
SamplingContext,
)
from sentry_sdk.tracing import Span, TransactionKwargs

T = TypeVar("T")
F = TypeVar("F", bound=Callable[..., Any])
Expand Down Expand Up @@ -473,7 +454,7 @@ def end_session():
@scopemethod
def set_transaction_name(name, source=None):
# type: (str, Optional[str]) -> None
return get_current_scope().set_transaction_name(name, source)
return _scope_get_current_scope().set_transaction_name(name, source)


def update_current_span(op=None, name=None, attributes=None, data=None):
Expand Down