How Could I remove those default tags I don't need
MikeLing opened this issue · 2 comments
MikeLing commented
Hi, How could I remove some default tags like device
and runtime
. Thank you :)
notheotherben commented
Hi @MikeLing, that actually wasn't a feature I had considered someone would want. I've added an Unset("runtime")
option which you can pass when creating your client or when capturing an event which will remove the corresponding field from the packet.
Subsequently added options (after the Unset
) will add the field back, so if you want to make absolutely certain that a field doesn't get exposed, you'll need to put your unset operations at the end of your Capture(...options)
.
Please let me know if this solves the problem you're running up against:
cl := sentry.DefaultClient().With(
sentry.Unset("device"),
sentry.Unset("runtime")
)
cl.Capture(sentry.Message("this shouldn't include device or runtime"))
MikeLing commented
ah, thank you @spartan563