Skip to content

Commit

Permalink
Revert "feat(tracing): Add propagate_traces deprecation warning (#3899
Browse files Browse the repository at this point in the history
)" (#4055)

Closes: #4054

We should log deprecation notices but since this notice is not
actionable it should be removed.
  • Loading branch information
cmanallen authored Feb 14, 2025
1 parent 7b5904a commit ae68d85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
7 changes: 0 additions & 7 deletions sentry_sdk/integrations/celery/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import sys
import warnings

from collections.abc import Mapping
from functools import wraps

Expand Down Expand Up @@ -70,11 +68,6 @@ def __init__(
exclude_beat_tasks=None,
):
# type: (bool, bool, Optional[List[str]]) -> None
warnings.warn(
"The `propagate_traces` parameter is deprecated. Please use `trace_propagation_targets` instead.",
DeprecationWarning,
stacklevel=2,
)
self.propagate_traces = propagate_traces
self.monitor_beat_tasks = monitor_beat_tasks
self.exclude_beat_tasks = exclude_beat_tasks
Expand Down
11 changes: 4 additions & 7 deletions tests/integrations/celery/test_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ def dummy_task():


def test_simple_no_propagation(capture_events, init_celery):
with pytest.warns(DeprecationWarning):
celery = init_celery(propagate_traces=False)

celery = init_celery(propagate_traces=False)
events = capture_events()

@celery.task(name="dummy_task")
Expand Down Expand Up @@ -534,10 +532,9 @@ def test_sentry_propagate_traces_override(init_celery):
Test if the `sentry-propagate-traces` header given to `apply_async`
overrides the `propagate_traces` parameter in the integration constructor.
"""
with pytest.warns(DeprecationWarning):
celery = init_celery(
propagate_traces=True, traces_sample_rate=1.0, release="abcdef"
)
celery = init_celery(
propagate_traces=True, traces_sample_rate=1.0, release="abcdef"
)

@celery.task(name="dummy_task", bind=True)
def dummy_task(self, message):
Expand Down

0 comments on commit ae68d85

Please sign in to comment.