Skip to content

Commit fc91e7d

Browse files
committed
ref(rust-tracing): Drop send_default_pii support
1 parent ffb9c2b commit fc91e7d

2 files changed

Lines changed: 7 additions & 20 deletions

File tree

‎sentry_sdk/integrations/rust_tracing.py‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
import sentry_sdk
3838
from sentry_sdk.integrations import Integration
39-
from sentry_sdk.scope import should_send_default_pii
4039
from sentry_sdk.utils import SENSITIVE_DATA_SUBSTITUTE
4140

4241
if TYPE_CHECKING:
@@ -161,14 +160,9 @@ def _include_tracing_fields(self) -> bool:
161160
"""
162161
By default, the values of tracing fields are not included in case they
163162
contain PII. A user may override that by passing `True` for the
164-
`include_tracing_fields` keyword argument of this integration or by
165-
setting `send_default_pii` to `True` in their Sentry client options.
163+
`include_tracing_fields` keyword argument of this integration.
166164
"""
167-
return (
168-
should_send_default_pii()
169-
if self.include_tracing_fields is None
170-
else self.include_tracing_fields
171-
)
165+
return bool(self.include_tracing_fields)
172166

173167
def on_event(self, event: str, sentry_span: "Span") -> None:
174168
deserialized_event = json.loads(event)

‎tests/integrations/rust_tracing/test_rust_tracing.py‎

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -463,21 +463,15 @@ def span_filter(metadata: Dict[str, object]) -> bool:
463463

464464

465465
@pytest.mark.parametrize(
466-
"send_default_pii, include_tracing_fields, tracing_fields_expected",
466+
"include_tracing_fields, tracing_fields_expected",
467467
[
468-
(True, True, True),
469-
(True, False, False),
470-
(True, None, True),
471-
(False, True, True),
472-
(False, False, False),
473-
(False, None, False),
468+
(True, True),
469+
(False, False),
470+
(None, False),
474471
],
475472
)
476473
def test_include_tracing_fields(
477-
sentry_init,
478-
send_default_pii,
479-
include_tracing_fields,
480-
tracing_fields_expected,
474+
sentry_init, include_tracing_fields, tracing_fields_expected
481475
):
482476
rust_tracing = FakeRustTracing()
483477
integration = RustTracingIntegration(
@@ -489,7 +483,6 @@ def test_include_tracing_fields(
489483
sentry_init(
490484
integrations=[integration],
491485
traces_sample_rate=1.0,
492-
send_default_pii=send_default_pii,
493486
)
494487
with sentry_sdk.start_span(name="custom parent"):
495488
rust_tracing.new_span(RustTracingLevel.Info, 3)

0 commit comments

Comments
 (0)