Skip to content

Deprecation warning causing test failures in Sentry #4054

@cmanallen

Description

@cmanallen

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.21.0

Steps to Reproduce

Failing tests: https://github.com/getsentry/sentry/actions/runs/13311941884/job/37176515275?pr=85146

____________________________________________ ERROR at setup of test_composite_backend_does_not_recurse ____________________________________________
tests/sentry/metrics/test_minimetrics.py:48: in scope
    client=Client(
.venv/lib/python3.13/site-packages/sentry_sdk/client.py:269: in __init__
    self._init_impl()
.venv/lib/python3.13/site-packages/sentry_sdk/client.py:392: in _init_impl
    self.integrations = setup_integrations(
.venv/lib/python3.13/site-packages/sentry_sdk/integrations/__init__.py:197: in setup_integrations
    instance = integration_cls()
.venv/lib/python3.13/site-packages/sentry_sdk/integrations/celery/__init__.py:73: in __init__
    warnings.warn(
E   DeprecationWarning: The `propagate_traces` parameter is deprecated. Please use `trace_propagation_targets` instead.

There doesn't seem to be a way to avoid it:

def __init__(
self,
propagate_traces=True,
monitor_beat_tasks=False,
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,
)

Previous release looked like this:

def __init__(
self,
propagate_traces=True,
monitor_beat_tasks=False,
exclude_beat_tasks=None,
):
# type: (bool, bool, Optional[List[str]]) -> None
self.propagate_traces = propagate_traces
self.monitor_beat_tasks = monitor_beat_tasks
self.exclude_beat_tasks = exclude_beat_tasks

Expected Result

Tests do not fail due to a warning message or we can prevent the warning in some way through configuration.

Actual Result

Tests fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions