Closed njern closed 7 years ago
Why are fields deleted anyhow? I checked some other community developed Hooks, and I didn't see any other hook dropping fields. Could we simply remove this?
@njern /cc @GlenDC
I think some special fields are removed to avoid duplicate data and large payload size when it used.
PR #25 is not to delete keys from logrus.Data and not to affect other hooks. @njern does this PR solve your problem? if so, I'll merge it.
I'm planning to add an option flag to preserve original data of "special fields" and send duplicated data to Sentry.
Fixed in v0.2.7
Just ran into this when I added
hook.StacktraceConfiguration.Enable = true
to one of my projects and could not understand why it suddenly made my error field (logging with logrus.WithError(...)) disappear from my logfiles..
Turns out it was logrus_sentry "consuming" the error as part of sending it to Sentry. Looking at the code it does it with several other "special" fields as well, like "http_request".
Not sure what the best solution is here, but this should be configurable by the caller in some way - otherwise it's bound to cause these type of headaches for other people as well.