Hello. I am using InfluxDB OSS v2.7.4 with the xk6-output-influxdb extension binary built with the latest version and k6 v0.49.0 to save k6 output metrics. I run everything locally.
When comparing the end-of-test summary from k6 and the data from InfluxDB (which I view using Grafana v10.2.2) I notice that there are some metrics that aren’t saved in InfluxDB. There are missing http-req*, checks, and especially iterations, especially if there is a number of failed requests and checks which makes the overall metrics loss greater. The average requests rate varies in my tests, say 10 up to 70 requests per second, and some with around 400 r/s. The loss varies between 1 to 13% for the requests and between 1 and 35% for the iterations for example, but mostly depends on how many failed requests a test has, the greater that number, then the greater the loss of the requests and checks and iterations. The loss of requests and checks metrics, and of failed requests and failed checks is usually parallel, the same.
Based on this answer I tried removing the vu and/or the iter tags from the K6_INFLUXDB_TAGS_AS_FIELDS environment variable and adding them to the --system-tags flag. However, since this answer is from before the introduction of “metadata”, I don’t think it does anything, InfluxDB seems to ignore vu and iter and there are no changes in the metrics InfluxDB saves.
I have also tried increasing the K6_INFLUXDB_CONCURRENT_WRITES and lowering the K6_INFLUXDB_PUSH_INTERVAL environment variables for the extension, but there were no differences at all, the loss was the same. I also tried observing the information in the --verbose k6 logs to modify the values for these variables, but there were no improvements with any of the values I tried.
Does anyone know why and how this happens?
Has anyone encountered this and maybe fixed it in any way?