Skip to content

Commit bc3f4e7

Browse files
committed
Merge branch 'potel-base' into ivana/potel/remove-custom-sampled
2 parents 8b8ef5e + 9977769 commit bc3f4e7

File tree

4 files changed

+4
-65
lines changed

4 files changed

+4
-65
lines changed

sentry_sdk/api.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
from typing import Union
3131
from typing import Generator
3232

33-
from typing_extensions import Unpack
34-
3533
from sentry_sdk.client import BaseClient
3634
from sentry_sdk._types import (
3735
Event,
@@ -42,7 +40,7 @@
4240
MeasurementUnit,
4341
LogLevelStr,
4442
)
45-
from sentry_sdk.tracing import Span, TransactionKwargs
43+
from sentry_sdk.tracing import Span
4644

4745
T = TypeVar("T")
4846
F = TypeVar("F", bound=Callable[..., Any])
@@ -258,7 +256,7 @@ def start_span(**kwargs):
258256

259257
def start_transaction(
260258
transaction=None, # type: Optional[Span]
261-
**kwargs, # type: Unpack[TransactionKwargs]
259+
**kwargs, # type: Any
262260
):
263261
# type: (...) -> Span
264262
"""

sentry_sdk/integrations/opentelemetry/scope.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434

3535
if TYPE_CHECKING:
3636
from typing import Tuple, Optional, Generator, Dict, Any
37-
from typing_extensions import Unpack
38-
39-
from sentry_sdk.tracing import TransactionKwargs
4037

4138

4239
class PotelScope(Scope):
@@ -136,7 +133,7 @@ def _incoming_otel_span_context(self):
136133
return span_context
137134

138135
def start_transaction(self, **kwargs):
139-
# type: (Unpack[TransactionKwargs]) -> Span
136+
# type: (Any) -> Span
140137
"""
141138
.. deprecated:: 3.0.0
142139
This function is deprecated and will be removed in a future release.

sentry_sdk/scope.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@
5656
from typing import Union
5757
from typing import Self
5858

59-
from typing_extensions import Unpack
60-
6159
from sentry_sdk._types import (
6260
Breadcrumb,
6361
BreadcrumbHint,
@@ -70,8 +68,6 @@
7068
Type,
7169
)
7270

73-
from sentry_sdk.tracing import TransactionKwargs
74-
7571
import sentry_sdk
7672

7773
P = ParamSpec("P")
@@ -910,7 +906,7 @@ def add_breadcrumb(self, crumb=None, hint=None, **kwargs):
910906
self._n_breadcrumbs_truncated += 1
911907

912908
def start_transaction(self, **kwargs):
913-
# type: (Unpack[TransactionKwargs]) -> Union[NoOpSpan, Span]
909+
# type: (Any) -> Union[NoOpSpan, Span]
914910
"""
915911
.. deprecated:: 3.0.0
916912
This function is deprecated and will be removed in a future release.

sentry_sdk/tracing.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
from typing import Union
3939
from typing import TypeVar
4040

41-
from typing_extensions import TypedDict
42-
4341
P = ParamSpec("P")
4442
R = TypeVar("R")
4543

@@ -50,56 +48,6 @@
5048

5149
from sentry_sdk.tracing_utils import Baggage
5250

53-
class SpanKwargs(TypedDict, total=False):
54-
op: str
55-
"""
56-
The span's operation. A list of recommended values is available here:
57-
https://develop.sentry.dev/sdk/performance/span-operations/
58-
"""
59-
60-
description: str
61-
"""A description of what operation is being performed within the span."""
62-
63-
status: str
64-
"""The span's status. Possible values are listed at https://develop.sentry.dev/sdk/event-payloads/span/"""
65-
66-
containing_transaction: Optional["Span"]
67-
"""The transaction that this span belongs to."""
68-
69-
start_timestamp: Optional[Union[datetime, float]]
70-
"""
71-
The timestamp when the span started. If omitted, the current time
72-
will be used.
73-
"""
74-
75-
scope: "sentry_sdk.Scope"
76-
"""The scope to use for this span. If not provided, we use the current scope."""
77-
78-
origin: Optional[str]
79-
"""
80-
The origin of the span.
81-
See https://develop.sentry.dev/sdk/performance/trace-origin/
82-
Default "manual".
83-
"""
84-
85-
name: str
86-
"""A string describing what operation is being performed within the span/transaction."""
87-
88-
class TransactionKwargs(SpanKwargs, total=False):
89-
source: str
90-
"""
91-
A string describing the source of the transaction name. This will be used to determine the transaction's type.
92-
See https://develop.sentry.dev/sdk/event-payloads/transaction/#transaction-annotations for more information.
93-
Default "custom".
94-
"""
95-
96-
ProfileContext = TypedDict(
97-
"ProfileContext",
98-
{
99-
"profiler_id": str,
100-
},
101-
)
102-
10351
BAGGAGE_HEADER_NAME = "baggage"
10452
SENTRY_TRACE_HEADER_NAME = "sentry-trace"
10553

0 commit comments

Comments
 (0)