evalphobia / logrus_sentry

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

Add support for github.com/pkg/errors interfaces #23

Closed flimzy closed 7 years ago

flimzy commented 7 years ago

This PR adds support for two interfaces, implemented by the github.com/pkg/errors package:

coveralls commented 7 years ago

Coverage Status

Coverage increased (+5.6%) to 65.649% when pulling 8ab1ab00992f46b9afb46fc1e85349d60e467a2d on flimzy:pkgerrors into 16401a02b5b34a236a2feb04ced6bbcb4aec8900 on evalphobia:master.

flimzy commented 7 years ago

One possible improvement could be made on this PR, and if requested, I'm happy to implement the changes. And that is that by using the causer interface, it becomes possible to report multiple exceptions, which Sentry supports. Thus, in principle, we could go through all wrapped errors, and generate a Sentry exception interface for each one.

The only reason I didn't do this right away is that for my own application, and possibly for others, all that we really care about is the causing error. The various wrappers around it are often/usually extraneous, and would present duplicate information.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+4.8%) to 64.844% when pulling efdf33a6c9b6d4b6410cfe47eb73f6fe46fe746e on flimzy:pkgerrors into 16401a02b5b34a236a2feb04ced6bbcb4aec8900 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+4.8%) to 64.844% when pulling efdf33a6c9b6d4b6410cfe47eb73f6fe46fe746e on flimzy:pkgerrors into 16401a02b5b34a236a2feb04ced6bbcb4aec8900 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+4.8%) to 64.844% when pulling e5cf1f5ac2d544b4f3739eb085d7b65e31cebac8 on flimzy:pkgerrors into 16401a02b5b34a236a2feb04ced6bbcb4aec8900 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+4.8%) to 64.844% when pulling e5cf1f5ac2d544b4f3739eb085d7b65e31cebac8 on flimzy:pkgerrors into 16401a02b5b34a236a2feb04ced6bbcb4aec8900 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+4.8%) to 64.844% when pulling e5cf1f5ac2d544b4f3739eb085d7b65e31cebac8 on flimzy:pkgerrors into 16401a02b5b34a236a2feb04ced6bbcb4aec8900 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+4.8%) to 64.844% when pulling d0adf546fcb25ab26099c0cfb15d18e46f4a82ca on flimzy:pkgerrors into 16401a02b5b34a236a2feb04ced6bbcb4aec8900 on evalphobia:master.

evalphobia commented 7 years ago

@flimzy Thanks! 🐎

evalphobia commented 7 years ago

Note: https://github.com/evalphobia/logrus_sentry/releases/tag/v0.2.4