Could anybody please tell me how to send test metrics to a prometheus remote write about each request made, or just every second? So, I ran the test from the demo script for 30 secs, it produces 23 requests, but in the prometheus chart I see only 4 dots:
I already tried this but it just increases the sampling time from 5s to 1s, but still sends the aggregated data, so if in the one second, there were 7 requests, I will see only the average value.
If you want to export metrics to json, then you can use --out json
I tried this too, but in the resulting json file I see only the summary data, not per-request data, like in CSV.
So, the only way for now, that I found, is to parse the CSV (it’s not easy, cuz we should filter not only columns but also rows).
And, also, do the desired output programmatically in js, like this:
In the json output: “* type - can have the values Metric or Point where Metric means the line is declaring a metric, and Point is an actual data point (sample) for a metric.”
And I have another idea. You can write a custom ouput extension , or you can write a custom output plugin for the xk6-output-plugin where you can get all the sample point metrics.