Skip to content

Commit fdd627c

Browse files
committed
Merge branch 'master' into antonpirker/better-aws-tests
2 parents 2d4e47d + 968b362 commit fdd627c

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-2024 Functional Software, Inc. dba Sentry
3+
Copyright (c) 2018-2025 Functional Software, Inc. dba Sentry
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sentry_sdk/client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from datetime import datetime, timezone
77
from importlib import import_module
88
from typing import cast, overload
9+
import warnings
910

1011
from sentry_sdk._compat import PY37, check_uwsgi_thread_support
1112
from sentry_sdk.utils import (
@@ -140,6 +141,13 @@ def _get_options(*args, **kwargs):
140141
)
141142
rv["socket_options"] = None
142143

144+
if rv["enable_tracing"] is not None:
145+
warnings.warn(
146+
"The `enable_tracing` parameter is deprecated. Please use `traces_sample_rate` instead.",
147+
DeprecationWarning,
148+
stacklevel=2,
149+
)
150+
143151
return rv
144152

145153

tests/test_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,3 +1490,9 @@ def run(self, sentry_init, capture_record_lost_event_calls):
14901490
)
14911491
def test_dropped_transaction(sentry_init, capture_record_lost_event_calls, test_config):
14921492
test_config.run(sentry_init, capture_record_lost_event_calls)
1493+
1494+
1495+
@pytest.mark.parametrize("enable_tracing", [True, False])
1496+
def test_enable_tracing_deprecated(sentry_init, enable_tracing):
1497+
with pytest.warns(DeprecationWarning):
1498+
sentry_init(enable_tracing=enable_tracing)

0 commit comments

Comments
 (0)