Http_reqs counter metric does not increment

When running a K6 test that makes multiple http requests the counter metric http_reqs always has a value of 1
The expected behaviour is that this counter will increase during the test and continuously output the metric with the current value. The metric should not reset until the test is completed.
The impact of the counter not incrementing is that is it not possible to generate a TPS value in Prometheus by using the rate(http_reqs[1m]) query
This behaviour can be reproduced by using the docker example in GitHub - grafana/xk6-output-prometheus-remote: k6 extension to output real-time test metrics using Prometheus Remote Write.

Hi @Jperrin,
welcome to the community forum :tada:

are you sure you’re querying the right metric? The metric name should be k6_http_reqs and on my side I see the metric increased as expected.
Can you double check and maybe add some info/query about how you trying to get the data?

Let me know.

Hello Ivan,
Thanks for the reply. This is a little confusing and I’ll explain why

If I build the Prometheus writer extension with xk6 and use that binary to output to Prometheus I can see the k6_https_reqs metric which increases as expected.(As you observed). Same applies to the docker version.
However if I use the K6 core binary and output to Influxdb 1.8 then I don’t see any metrics starting with K6. I do see some metrics starting with http_req including http_reqs which is always 1 as I reported.
Is this expected? That’s my first question
The reason I’m wanting to output to Influxdb 1.8 is because we are using an OpenTelemetry Collector to receive K6 metrics via the Influxdb receiver (which uses Influxdb1.8 protocol).
So my second question is what is the recommended configuration to output K6 to OpenTelemetry and get the full set of K6 metrics including the K6_http_reqs counter?
We are committed to using OpenTelemetry as it decouples the testing tools from the time series databases as well as supporting tracing and logging. I can provide configs but itss pretty basic. We are using the influxdb receiver and the Prometheus exporter in the OpenTel collector.
Regards,