TYK Analytics(Pump) get token (user) quota

Hi fellows,

I am planning on using Prometheus with Pump to get analytics. My first idea was to have individual metrics for the usage and how many more requests in the quota are left. Is that being able to be retrieved via Prometheus and Pump?

Use case is to show the user how many requests it has left. Simple as that.


1 Like

@brahama_von Can you explain more on individual metrics for usage?

As for the remaining quota you can see that from the X-Ratelimit-Remaining response headers after a request has been made.

To see in it analytics, you would have to examine the raw response from the analytics record.

I am not sure if the Prometheus pump spits out the raw response. But if you don’t see it, you could create a custom pump like this thread and map a label to one of it.

You could even extract the value of the X-Ratelimit-Remaining rather than the whole response.

Hope this helps.

1 Like

Thanks for the answer! Super helpful all the insights :slight_smile:
Will give it a try today.

My idea is to have a graph in a Profile so that the users can see the usage and remaining quota over a timeline.

Also one thing I was about to create a Post is that the repo where the pump docker image is being hosted says that the repo will be deprecated. Any plans to move the image creation to another repo or duckerhub? Docker Hub


Hi @Olu ,

I am checking the info and maybe there is an incorrect link in the ‘thread’ that you mention? It is pointing to the same link as ‘analytics record’.
You mean a forum thread i am asumming.


Oops! My error. I have attached the correct link.

1 Like

Not sure actually. We’ve been using that repo for quite some time now. And we still use it in some demos:

If it ever changes, then those repos would be modified as well