-
Notifications
You must be signed in to change notification settings - Fork 104
feat(processor): Add Span Attachment scrubbing logic #5449
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
base: master
Are you sure you want to change the base?
Conversation
| let ExpandedAttachment { meta, body } = attachment; | ||
|
|
||
| relay_pii::eap::scrub( | ||
| ValueType::Attachments, // TODO: How do we event want to allow people to filter here? |
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.
Not sure if Span or Attachment makes more sense here for the user.
jjbayer
left a comment
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.
Nice!
|
|
||
| let processor = PiiAttachmentsProcessor::new(config.compiled()); | ||
| let mut payload = body.to_vec(); | ||
| if processor.scrub_attachment(filename, &mut payload) { |
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 think we should emit the timer(RelayTimers::AttachmentScrubbing) metric here, either directly or by calling processing::utils::attachments::scrub_attachment.
Adds the logic to scrub the attachment body as well as the attachment meta.