krakend-opencensus
krakend-opencensus copied to clipboard
Prometheus exporter issue
Hi,
we have a problem with Prometheus exporter in the simple KrakenD configuration present in test.txt (which is a JSON file).
In this configuration we have two endpoints (/users and /groups) and two corresponding backend services (/api/users and /api/groups). If we call both endpoints a number of times, in the output of /metrics we can find only references to one of backend services, the first one called. Conversely we can find references to all endpoints. If we call /users two times and /groups two times, we can find all metrics for /users and /groups, but we can find only metrics for /api/users and they are all added up (for example the count is four).
This is from /metrics:
krakend_opencensus_io_http_client_roundtrip_latency_count{http_client_host="localhost:8080",http_client_method="GET",http_client_path="/api/users",http_client_status="200"} 4
krakend_opencensus_io_http_server_latency_count{http_host="localhost:6060",http_method="GET",http_path="/groups",http_status="200"} 2
krakend_opencensus_io_http_server_latency_count{http_host="localhost:6060",http_method="GET",http_path="/users",http_status="200"} 2
We believe that the correct output of /metrics should be:
krakend_opencensus_io_http_client_roundtrip_latency_count{http_client_host="localhost:8080",http_client_method="GET",http_client_path="/api/users",http_client_status="200"} 2
krakend_opencensus_io_http_client_roundtrip_latency_count{http_client_host="localhost:8080",http_client_method="GET",http_client_path="/api/groups",http_client_status="200"} 2
The complete output of /metrics is in metrics.txt.