We’re trying to expose custom metrics with pump to prometheus. However if we define the custom metrics as described in the Readme we’re gettng an error in the log:
time="Nov 11 15:02:21" level=info msg="## Tyk Analytics Pump, 1.6.0 ##"
time="Nov 11 15:02:21" level=info msg="--> [REDIS] Creating single-node client"
time="Nov 11 15:02:21" level=info msg="Serving health check endpoint at http://localhost:8083/health ..."
time="Nov 11 15:02:22" level=error msg="invalid metric type:"
time="Nov 11 15:02:22" level=error msg="invalid metric type:"
time="Nov 11 15:02:22" level=error msg="invalid metric type:"
time="Nov 11 15:02:22" level=error msg="invalid metric type:"
time="Nov 11 15:02:22" level=error msg="invalid metric type:"
time="Nov 11 15:02:22" level=info msg="Starting prometheus listener on::9090"
time="Nov 11 15:02:22" level=info msg="Prometheus Pump Initialized"
time="Nov 11 15:02:22" level=info msg="Init Pump: PROMETHEUS"
Our Config:
TYK_PMP_PUMPS_PROMETHEUS_TYPE=prometheus
TYK_PMP_PUMPS_PROMETHEUS_META_ADDR=localhost:9090
TYK_PMP_PUMPS_PROMETHEUS_META_PATH=/metrics
TYK_PMP_PUMPS_PROMETHEUS_META_CUSTOMMETRICS='[{"name":"tyk_http_requests_total","description":"Total of API requests","metric_type":"counter","labels":["response_code","api_name"]}]'
TYK_PMP_PUMPS_PROMETHEUS_META_DISABLED_METRICS=[]