Skip to content

Commit 0420e0e

Browse files
committed
gate
1 parent 3d1ebe1 commit 0420e0e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sentry_sdk/traces.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
try_autostart_continuous_profiler,
2222
try_profile_lifecycle_trace_start,
2323
)
24+
from sentry_sdk.scope import should_send_default_pii
2425
from sentry_sdk.tracing_utils import Baggage
2526
from sentry_sdk.utils import (
2627
capture_internal_exceptions,
@@ -559,7 +560,8 @@ def _set_segment_attributes(self) -> None:
559560
if not self._is_segment():
560561
return
561562

562-
self.set_attribute("process.command_args", sys.argv)
563+
if should_send_default_pii():
564+
self.set_attribute("process.command_args", sys.argv)
563565

564566

565567
class NoOpStreamedSpan(StreamedSpan):

0 commit comments

Comments
 (0)