-
Notifications
You must be signed in to change notification settings - Fork 39
Differentiate between ajax and normal requests for performance overview #84
Comments
@mvantellingen thank you for this feature request. This could certainly be interesting. We've also considered differentiating different HTTP method requests to the same views. E.g. When we take another look at it, I will also be taking this issue into consideration. Thanks again! |
Hello @roncohen, I am particularly interested by the feature you mentioned, being able to distinguish HTTP requests served from the same django class based view. (GET /api/user/ vs POST /api/user/) Is there any plan regarding this? Thanks! And +1 for ajax vs. normal requests. |
@santiagomalter we shipped an implementation to distinguish between different http methods some months ago. If you don't see it, you might need to update your Opbeat module :) |
@piquadrat Thanks for the quick reply :) Indeed, my bad, I was trying to express something slightly different. In a Django context, we have multiple API endpoints served by the same class based view, let's say:
They all appear under the same "view", but performance can be totally different so it would make sense to use to distinguish them and if I'm correct it's not possible right now, because everything is aggregated under the same HTTP Method + View. But maybe it is too specific and you have no plan to add this feature? Solution could be to group requests by HTTP method + URL? Thank you for your awesome work anyway :) |
@santiagomalter are you using a framework like tastypie or Django Rest Framework or custom class based views? For the latter, and if you use viewsets, there's this workaround: https://gist.github.com/piquadrat/b494bd4b368ea4095dad3b629333ae58 |
Indeed, we are using Django Rest Framework. Thank you for the workaround, exactly what I was looking for, i'll implement that :) |
It would be cool to split the performance overview in regular requests and ajax requests. We can achieve this ourselves by appending '_ajax' to the view name if
request.is_ajax
is true (in Django) via monkeypatching.The text was updated successfully, but these errors were encountered: