diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index d57696d910..3d807d795a 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -134,6 +134,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh - Spans no longer have a `description`. Use `name` instead. - Dropped support for Python 3.6. - The `enable_tracing` `init` option has been removed. Configure `traces_sample_rate` directly. +- The `propagate_traces` `init` option has been removed. Use `trace_propagation_targets` instead. - The `custom_sampling_context` parameter of `start_transaction` has been removed. Use `attributes` instead to set key-value pairs of data that should be accessible in the traces sampler. Note that span attributes need to conform to the [OpenTelemetry specification](https://opentelemetry.io/docs/concepts/signals/traces/#attributes), meaning only certain types can be set as values. - The PyMongo integration no longer sets tags. The data is still accessible via span attributes. - The PyMongo integration doesn't set `operation_ids` anymore. The individual IDs (`operation_id`, `request_id`, `session_id`) are now accessible as separate span attributes. diff --git a/sentry_sdk/consts.py b/sentry_sdk/consts.py index 74d18ce80b..1fc920ac52 100644 --- a/sentry_sdk/consts.py +++ b/sentry_sdk/consts.py @@ -511,7 +511,6 @@ def __init__( debug=None, # type: Optional[bool] attach_stacktrace=False, # type: bool ca_certs=None, # type: Optional[str] - propagate_traces=True, # type: bool traces_sample_rate=None, # type: Optional[float] traces_sampler=None, # type: Optional[TracesSampler] profiles_sample_rate=None, # type: Optional[float] @@ -915,8 +914,6 @@ def __init__( :param profile_session_sample_rate: - :param propagate_traces: - :param auto_session_tracking: :param spotlight: diff --git a/sentry_sdk/scope.py b/sentry_sdk/scope.py index bf4a62ab01..43cb94a32d 100644 --- a/sentry_sdk/scope.py +++ b/sentry_sdk/scope.py @@ -610,13 +610,6 @@ def iter_trace_propagation_headers(self, *args, **kwargs): If no span is given, the trace data is taken from the scope. """ client = self.get_client() - if not client.options.get("propagate_traces"): - warnings.warn( - "The `propagate_traces` parameter is deprecated. Please use `trace_propagation_targets` instead.", - DeprecationWarning, - stacklevel=2, - ) - return span = kwargs.pop("span", None) span = span or self.span diff --git a/tests/tracing/test_integration_tests.py b/tests/tracing/test_integration_tests.py index 6fa9d66964..e6e436dbd2 100644 --- a/tests/tracing/test_integration_tests.py +++ b/tests/tracing/test_integration_tests.py @@ -117,20 +117,6 @@ def test_continue_trace(sentry_init, capture_envelopes, sample_rate): # noqa:N8 assert message_payload["message"] == "hello" -@pytest.mark.parametrize("sample_rate", [0.0, 1.0]) -def test_propagate_traces_deprecation_warning(sentry_init, sample_rate): - sentry_init(traces_sample_rate=sample_rate, propagate_traces=False) - - with start_span(name="hi"): - with start_span() as old_span: - with pytest.warns(DeprecationWarning): - dict( - sentry_sdk.get_current_scope().iter_trace_propagation_headers( - old_span - ) - ) - - @pytest.mark.parametrize("sample_rate", [0.5, 1.0]) def test_dynamic_sampling_head_sdk_creates_dsc( sentry_init,