Open Tuxino opened 2 weeks ago
Hi @Tuxino, thanks for your suggestion, I think it's really a good idea!
Would you be able to provide a simple pull request with a code sample to propose and evaluate?
It would be very much appreciated to have a real scenario to evaluate and possibly integrate into the main branch.
Thanks for your feedback! 💘 Marco.
Its useful to be able to generate elapsed request time for successful and unsuccessful requests.
For a successful request, we can write event handlers for OnBeforeAction and OnAfterAction to determine elapsed time and add this to a Prometheus Histogram. However, if an error occurs, its possible that neither of these event handlers get called eg. for a 404.
I propose that we add a timestamp to the existing DMVC middleware
This enables either the OnAfterAction or a global exception handler to figure out the elapsed time and add it to a histogram.