hi @byu ,
you are right, those metrics are not exposed by default. You need to update your Tyk Pump configuration to expose them, see the example at the top of the doc page: Monitor your APIs with Prometheus.
Look for:
"custom_metrics":[
{
"name":"tyk_http_requests_total",
"description":"Total of API requests",
"metric_type":"counter",
"labels":["response_code","api_name","method","api_key","alias","path"]
},
{
"name":"tyk_http_latency",
"description":"Latency of API requests",
"metric_type":"histogram",
"labels":["type","response_code","api_name","method","api_key","alias","path"]
}
Exposing custom Prometheus metrics is a functionality is available since Tyk Pump 1.6, so you also might want to check which version you are using.
The only time that can be exposed at the moment is the upstream time. We do not expose the time spent in the Gateway at the moment (though that is something we are considering for the future). I agree that this is confusing when talking about total, what we mean here is the sum of the upstream time.
I hope this helps, let me know if you have any questions!
Also you might want to look at the demo project on GitHub to see it running. Your feedback about Tyk & Prometheus would be also very appreciated on this thread: SLIs and SLOs with Prometheus and Grafana for your APIs managed by Tyk
Sonja