-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(relay): add view hierarchy scrubbing #4452
Conversation
# Conflicts: # Cargo.lock # relay-pii/Cargo.toml # relay-server/src/services/processor/attachment.rs # tests/integration/test_attachments.py
# Conflicts: # CHANGELOG.md
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.
Looks good!
@@ -49,6 +49,7 @@ use serde::de; | |||
/// } | |||
/// } | |||
/// ``` | |||
#[allow(missing_docs)] |
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.
Should we add some docs instead?
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.
I'm not sure how valuable they would be. Most of the functions are transform_<type>
so docs would look like Transforms a bool using the given transformation. By default it will use the identity function
which is sort of what is already mentioned in the doc block for the Trait.
@@ -90,14 +91,12 @@ pub trait Transform<'de> { | |||
v | |||
} | |||
|
|||
serde::serde_if_integer128! { |
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 macro is not useful anymore, according to the docs: Data formats that require a minimum Rust compiler version of at least 1.26 do not need to bother with this macro and may assume support for 128-bit integers.
match processor.scrub_json(&payload) { | ||
Ok(output) => { | ||
metric!( | ||
timer(RelayTimers::ViewHierarchyScrubbing) = start.elapsed(), |
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.
Probably the wrong PR for this, but we could just have a generic 'attachment scrubbing' metric and tag it with what is being scrubbed.
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.
We do have a generic AttachmentScrubbing
metric with the attachment_type
as a tag but it seems to pertain to the generic scrub_attachment
function while the specific one is emitted if a specific scrub function fails and it falls back to the generic scrub function, see scrub_minidump
.
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
This PR adds explicit ViewHierarchy scrubbing to the attachment scrubbing process.
Most of the logic is taken from the current recording scrubbing because both are JSON files.