Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat(tracing): Add propagate_traces deprecation warning (#3899)" #4055

Merged
merged 3 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading