Skip to content

Commit ce815e8

Browse files
committed
more removals
1 parent fff9f16 commit ce815e8

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

sentry_sdk/scope.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -946,9 +946,7 @@ def add_breadcrumb(self, crumb=None, hint=None, **kwargs):
946946
while len(self._breadcrumbs) > max_breadcrumbs:
947947
self._breadcrumbs.popleft()
948948

949-
def start_transaction(
950-
self, transaction=None, custom_sampling_context=None, **kwargs
951-
):
949+
def start_transaction(self, transaction=None, **kwargs):
952950
# type: (Optional[Transaction], Optional[SamplingContext], Unpack[TransactionKwargs]) -> Union[Transaction, NoOpSpan]
953951
"""
954952
Start and return a transaction.
@@ -974,7 +972,6 @@ def start_transaction(
974972
975973
:param transaction: The transaction to start. If omitted, we create and
976974
start a new transaction.
977-
:param custom_sampling_context: The transaction's custom sampling context.
978975
:param kwargs: Optional keyword arguments to be passed to the Transaction
979976
constructor. See :py:class:`sentry_sdk.tracing.Transaction` for
980977
available arguments.
@@ -985,8 +982,6 @@ def start_transaction(
985982

986983
try_autostart_continuous_profiler()
987984

988-
custom_sampling_context = custom_sampling_context or {}
989-
990985
# if we haven't been given a transaction, make one
991986
transaction = Transaction(**kwargs)
992987

@@ -996,7 +991,6 @@ def start_transaction(
996991
"transaction_context": transaction.to_json(),
997992
"parent_sampled": transaction.parent_sampled,
998993
}
999-
sampling_context.update(custom_sampling_context)
1000994
transaction._set_initial_sampling_decision(sampling_context=sampling_context)
1001995

1002996
if transaction.sampled:

tests/tracing/test_sampling.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -211,19 +211,6 @@ def test_passes_parent_sampling_decision_in_sampling_context(
211211
assert sampling_context["parent_sampled"]._mock_wraps is parent_sampling_decision
212212

213213

214-
def test_passes_custom_samling_context_from_start_transaction_to_traces_sampler(
215-
sentry_init, DictionaryContaining # noqa: N803
216-
):
217-
traces_sampler = mock.Mock()
218-
sentry_init(traces_sampler=traces_sampler)
219-
220-
start_transaction(custom_sampling_context={"dogs": "yes", "cats": "maybe"})
221-
222-
traces_sampler.assert_any_call(
223-
DictionaryContaining({"dogs": "yes", "cats": "maybe"})
224-
)
225-
226-
227214
def test_sample_rate_affects_errors(sentry_init, capture_events):
228215
sentry_init(sample_rate=0)
229216
events = capture_events()

0 commit comments

Comments
 (0)