Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access a handlers response? #651

Closed
rreynier opened this issue Sep 22, 2015 · 3 comments
Closed

How to access a handlers response? #651

rreynier opened this issue Sep 22, 2015 · 3 comments

Comments

@rreynier
Copy link

I am currently using the Raven handler so that my exceptions go into Sentry. Upon capturing an Exception in Sentry, Sentry will respond with an ID. Before my current attempt at implementing Monolog, I would capture the exception in Sentry and then my error page would show the Sentry ID (if the Sentry call succeeded). Ex. "An error has occured. Please contact support and reference #[sentry-id]." The Monolog Raven handler doesn't seem to expose the Sentry Id in any sort of way. In fact the response of captureException() isn't actually captured.

Do you have any suggestion on how to go about exposing this somehow? I could extend the Raven handler an possible just store some sort of GLOBAL but that seems awful dirty.

Would love to hear your thoughts.

@Seldaek
Copy link
Owner

Seldaek commented Sep 23, 2015

I guess the best is storing this id in the raven handler and then adding a public getLastExceptionId or whatever makes most sense (can you get an id to any msg or only exceptions?). That way your app can then fetch the id from the handler directly. Shouldn't be too hard to implement and it avoids globals :)

@rreynier
Copy link
Author

I believe both exceptions and messages provide you with a unique sentry id. Its extremely useful to be able to be pointed to the exact record in Sentry by support.

Anyway, I will investigate this approach tomorrow and report back on my implementation.

Thanks!

@Seldaek
Copy link
Owner

Seldaek commented Nov 18, 2015

Closing as I don't think there is much to do here, but if you have any more to say feel free to add :)

@Seldaek Seldaek closed this as completed Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants