uwsgi-sentry icon indicating copy to clipboard operation
uwsgi-sentry copied to clipboard

Automatic URL support ?

Open noirbizarre opened this issue 9 years ago • 2 comments

Hi !

Thanks for this plugin, it's very useful.

I'm wondering if it's possible to transmit to sentry the URL which is currently processed ?

In my case, I configured a log alarm for harakiris and I wanted to have the request URL which triggered the Harakiri. Is it possible ?

noirbizarre avatar Sep 22 '15 08:09 noirbizarre

Well, plugins can expose a "harakiri" hook that is called whenever harakiri is triggered.

The sentry plugin could register its harakiri handler for sending all the required infos (they are always available in the master even if the worker is damaged/death)

Basically you add a .harakiri entry here:

https://github.com/unbit/uwsgi-sentry/blob/master/sentry.c#L564

that calls the sentry_request() function passing it a string blob with all the infos you want.

If you can write the feature i will be happy to review and merge it, otherwise i'll put it in my TODO list

unbit avatar Sep 22 '15 13:09 unbit

Thanks for the response. I will look closer to the plugin framework and try to submit a pull-request. It's been a long time since I've coded in C ! Good occasion to try again! :)

noirbizarre avatar Sep 28 '15 10:09 noirbizarre