DRF throttle monitoring

As the admin of a DRF system that uses throttling, I’d like to have more visibility into what is currently going on with throttling behavior. Two primary things I’m interested in:

  • Notification email to admin when a user has hit their throttle (if some users are hitting it frequently I want to address that)
  • Be able to answer a user question: “How far through my quota for the day am I right now?”

The DRF throttling docs are OK, but don’t mention how to get the current count for a user on a view.

Are there plugins or extensions that can help with throttle monitoring and notification? Or do I need to write them from scratch?

im not sure if there are any extensions that can do that, but you can override drf throttling classes and customize it.

as you can see there are multiple functions that can help you to check if user or anonuser request is allowed or not and for example if it is not allowed you can send an email to admin etc.
also if you want to customize the error messages, this is a good approach as well: