Properties sanitizer#64
Merged
Merged
Conversation
benjackwhite
approved these changes
Nov 14, 2023
benjackwhite
left a comment
There was a problem hiding this comment.
Personally I like it. I think sanitize properties is the right terminology (certainly as good as any other)
Member
Author
Alright, added tests and updated the usage markdown, will cut a version :) |
Member
Author
|
For context, there was a workaround before: This would work for manually captured events, but it'd not work for automatically captured events nor events that don't contain the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Some SDKs have a
sanitize_propertiesmethod, othersproperty_denylist(which is just a deny list instead of giving the flexibility of adding, redacting, or removing properties).This is similar to
sanitize_propertiesbut as a callback that is run before the event is cached or sent over the wire.The user can redact, remove, or add any properties.
This would work for automatic events as well since it runs for every single event and not only manually captured events.
The downside is that the user can mess up with properties that may cause a bug on the backend or something.
💚 How did you test it?
📝 Checklist