Http_req_duration wrong datadog

Hi guys, I am having an issue with http_req_duration. on the pipeline it shows the correct med but on datadog it shows a completely different number. any idea on how to get it right?

Hi @phaltoe,

I ran some tests outputting to Datadog, and wasn’t able to quite reproduce your situation, but I did notice some weirdness with the metrics in Datadog.

After a first test the values seemed to align:

But running subsequent tests it continued increasing, even though the med values I was seeing in k6’s CLI output stayed more-or-less the same (within a few ms). Currently my avg over the past 15 minutes is 140.80ms, which is higher than what k6 was showing me.

Digging into the Metrics Explorer shows strange spikes in the values, which I didn’t see in the local report:

It seems like some aggregation issue either from k6->DogStatsD or from DogStatsD->Datadog that ends up submitting higher values.

Can you share a screenshot of your k6.http_req_duration.median graph from the Metrics Explorer and confirm if you’re seeing the same behavior?

Also keep in mind that that value in the dashboard is an average over the time period you selected, which, depending on the range and your previous metrics could skew your expected result. So make sure that you’re viewing the correct time range.

1 Like