Flask-MonitoringDashboard icon indicating copy to clipboard operation
Flask-MonitoringDashboard copied to clipboard

Record request body for outliers

Open Rashwan opened this issue 5 years ago • 3 comments

Is it possible to record the request body for POST requests that were identified as outliers? My Use case is that I want to monitor an endpoint that receives a free-form text and performs some analytics on it so if a request takes too much time I'd ideally like to know if something in the request body triggered this behavior. As I can see now the current behavior only saves the request headers and environment.

Rashwan avatar Mar 17 '20 23:03 Rashwan

Hi @Rashwan !

This is a good idea!

If you look at the outlier info now, you'll see that there was an attempt of writing out the request info in the Request Environment at the end, however the printout of the object only contains the object type and not the data as the figure shows:

image

If in that place, the POST data would be printed you would have what you want, right?

Next question is: do you think you can implement this and send a PR with it? I'll be happy to review it and integrate it in the next version of the FMD!

Cheers! M.

mircealungu avatar Mar 18 '20 16:03 mircealungu

Thanks for your quick response @mircealungu

So for your first question yes that would be exactly what I want.

As for implementing it, I will try to do it, do you have any suggestions on where to start?

Rashwan avatar Mar 19 '20 10:03 Rashwan

Hi @Rashwan, sorry for replying so late. Here we collect the request information. This should be a good starting point. Let us know if you need any support in implementing this feature.

bogdanp05 avatar Apr 06 '20 20:04 bogdanp05