-
Notifications
You must be signed in to change notification settings - Fork 92
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
fix(pii): Scrub user fields in span.sentry_tags #4364
Conversation
@@ -1183,7 +1183,7 @@ def test_span_ingestion_with_performance_scores( | |||
"data": { | |||
"transaction": "/page/with/click/interaction/jane/123", | |||
"replay_id": "8477286c8e5148b386b71ade38374d58", | |||
"user": "admin@sentry.io", | |||
"user": "[email]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now scrubbed by default, just like the top level event.user.email
.
/// A list of supported span tags for tag extraction. | ||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] | ||
#[allow(missing_docs)] | ||
pub enum SpanTagKey { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of storing a BTreeMap<SpanTagKey, Annotated<String>>
, we now have a SentryTags
struct.
User fields are transferred into
span.sentry_tags
before PII scrubbing. Most user fields are marked aspii = true
, that is, they should be scrubbed by default.This PR
sentry_tags
into a special typeSentryTags
, such that we can mark specific tags aspii = true
,sentry_tags.user_ip
to the builtin PII selector for IP scrubbing.