Hi, so I’ve setup logging k6 test results to Grafana via prometheus remote write as instructed in the guide:
So I’m using Native Histogram mapping and the dashboard provided in linked GitHub repo. Mostly everything works great, except in the graphs it’s impossible to differentiate between different requests:
In this particular test I have 3 scenarios calling 3 different api endpoints, calling two different endpoints in setup and teardown, and also there’s requests related to user authentication. Ideally I wouldnt want the setup and teardown related requests to show up at all, and user authentication requests wouldn’t need to show up either. And some ability to differentiate between the requests would be nice, now they all just have the same color and name, which is the global test id which needs to be set according to the guide.
Is there anything to be done to be able to differentiate between these requests? I tried putting tags to my http requests, but it didn’t help.
And some ability to differentiate between the requests would be nice, now they all just have the same color and name, which is the global test id which needs to be set according to the guide.
Would you like to see a specific pattern or just different random colors would be enough?
Hi, thanks for a response.
Since making this post, I’ve dived into configuring Grafana and have figured out a bit how it all works.
Writing actual Grafana queries is still hard (e.g. I have little idea what’s happening on a query like this (histogram_sum(rate($metrics{testid=~"$testid"}[$__rate_interval])) / histogram_count(rate($metrics{testid=~"$testid"}[$__rate_interval])))), but I’ve managed to configure the dashboard quite well, and did manage by exclude requests by using tags.
About colors I still had problems though. After much Googling, it unfortunately seems I can’t define a custom color palette in Grafana. There’s only the option for “classic pallette” which definitely wont do, since red is used for errors and yellow for request rate, etc. Would be nice if I could define my own palette of like green, blue, violet,…