You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, SentryBaseEvent.contexts is exposed as an immutable map, which prevents beforeSend handlers from removing and adding to it. I would like to remove the device context, as it seems an unnecessary privacy concern.
Since the actual implementation is mutable, you can cast contexts to MutableMap and modify it, but any changes are ignored, since they are not copied back to the native field.
I've implemented a change that will copy changes to contexts back. I'm not sure if that's the right approach, or whether it would be better to add methods for removing and adding event contexts. Should I post a PR?
Activity
linear-code commentedon Mar 26, 2026
KMP-88
buenaflor commentedon Mar 31, 2026
thanks for the issue! this is definitely wrong on our end as you should be able to manipulate the data in beforeSend.
we'll take a look