Does k6 generate latency tables in prometheus

I have a question about prometheus remote write latency tables when coupled with the latest OSS version of k6. when reading this doc I’m trying to ensure that when I export metrics to prometheus the latency table I need is created remote-write.

I think by default k6 to prometheus creates this metrics table for latency - k6_http_req_duration_p99, how do I get k6_http_req_duration_max, k6_http_req_duration_max, k6_http_req_duration_p50 tables created in prometheus?

do I create custom summaryTrendStats: [ ‘min’, ‘p(50)’, ‘max’, ‘p(95)’, ‘p(99)’],

will this create the prometheus tables for me?

or does k6_http_req_duration_p99 contain the raw latency metrics exported rather than the just p99 as the label suggests?


Hey @PlayStay,
you can set the stats exported via K6_PROMETHEUS_RW_TREND_STATS option. You can find an example of how to use it in the documentation here.

Let me now if it helps.