|
24 | 24 | from typing import Tuple, Optional, Generator, Dict, Any |
25 | 25 | from typing_extensions import Unpack |
26 | 26 |
|
27 | | - from sentry_sdk._types import SamplingContext |
28 | 27 | from sentry_sdk.tracing import TransactionKwargs |
29 | 28 |
|
30 | 29 |
|
@@ -112,20 +111,18 @@ def _incoming_otel_span_context(self): |
112 | 111 |
|
113 | 112 | return span_context |
114 | 113 |
|
115 | | - def start_transaction(self, custom_sampling_context=None, **kwargs): |
116 | | - # type: (Optional[SamplingContext], Unpack[TransactionKwargs]) -> POTelSpan |
| 114 | + def start_transaction(self, **kwargs): |
| 115 | + # type: (Unpack[TransactionKwargs]) -> POTelSpan |
117 | 116 | """ |
118 | 117 | .. deprecated:: 3.0.0 |
119 | 118 | This function is deprecated and will be removed in a future release. |
120 | 119 | Use :py:meth:`sentry_sdk.start_span` instead. |
121 | 120 | """ |
122 | | - return self.start_span(custom_sampling_context=custom_sampling_context) |
| 121 | + return self.start_span(**kwargs) |
123 | 122 |
|
124 | | - def start_span(self, custom_sampling_context=None, **kwargs): |
125 | | - # type: (Optional[SamplingContext], Any) -> POTelSpan |
126 | | - return POTelSpan( |
127 | | - **kwargs, custom_sampling_context=custom_sampling_context, scope=self |
128 | | - ) |
| 123 | + def start_span(self, **kwargs): |
| 124 | + # type: (Any) -> POTelSpan |
| 125 | + return POTelSpan(**kwargs, scope=self) |
129 | 126 |
|
130 | 127 |
|
131 | 128 | _INITIAL_CURRENT_SCOPE = PotelScope(ty=ScopeType.CURRENT) |
|
0 commit comments