evalphobia / logrus_sentry

sentry hook for logrus
MIT License
194 stars 78 forks source link

format extra data before send to sentry #11

Closed favadi closed 8 years ago

favadi commented 8 years ago

convert to string if a field type is:

if field's type already implements json.Unmarshaler do nothing

The reason for this PR, because the use of logrus.WithError is popular and if the error type doesn't implement json.Unmarshaler, the value won't be sent to sentry server.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+1.4%) to 50.0% when pulling aadc900253e44d5afd4a6f2d77f4a6f8e41ca73e on favadi:format-extra-data into d265708c9c877d2f458e673f0af437a0529baee9 on evalphobia:master.

evalphobia commented 8 years ago

@favadi Thanks, it's nice feature.

Before merge, would you write some test for the new function? (or I'll write after merge!)

coveralls commented 8 years ago

Coverage Status

Coverage increased (+6.2%) to 54.787% when pulling b4a7be867fc74cc131c62a9561c672211b35c198 on favadi:format-extra-data into d265708c9c877d2f458e673f0af437a0529baee9 on evalphobia:master.

favadi commented 8 years ago

@evalphobia I wrote test, we gain 5% code coverage. 😈

evalphobia commented 8 years ago

Great! thanks! :sushi: