-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
[v9]: Not possible to remove information in beforeSend (make SentryEvent and related classes mutable) #2672
Comments
hi, thanks for raising this. we'll look into this and see how we can provide an option to make this possible |
@ColinSchmale I believe setting it to an empty string |
**** is also fine for me. I mostly created this issue because the code in the documentation is wrong and maybe to also get some information why this happens and if my solution is okay. |
yeah we gotta update the docs definitely it's been like this way before my time but afaict it is intended that way. so your method is right, setting null won't do anything you have to set it to some value e.g empty string or how you did it I don't think it's ideal from a dx perspective but let's see what we can do there |
Since there is no practical use for having these immutable we've decided to refactor these into mutable data classes for the next major v9 |
Platform
Flutter Web
Obfuscation
Enabled
Debug Info
Enabled
Doctor
Version
8.12.0
Steps to Reproduce
Use options.beforeSend to override a value like this:
Expected Result
The value is not sent (or null).
Actual Result
The value is sent and not null.
This is what the documentation says about how to remove information:
but when you take a look at the code, this cannot work:
Replacing the geo object with an empty geo object does also not work. It seems that the data is overwritten afterwards.
What I ended up doing was masking the city value like this:
Related to #980
Are you willing to submit a PR?
None
The text was updated successfully, but these errors were encountered: