-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong percentile values for metrics shown in Datadog #2819
Comments
I think sending our Currently this is not supported, and we removed the documentation about the previously wrong query in grafana/k6-docs#895. |
waiting for a update about it... all % metrics are different in Datadog... |
Sorry about that @vieiraes. 😞 You can see some updates in #2982. What we decided to do is to split up the DataDog and New Relic outputs into separate k6 extensions, since it's clear that they can't be well supported by the generic This work is high priority, as we know it's a major impact for k6 users of these backends, so it's likely we'll start working on this in the next few weeks, but we can't promise any ETAs yet. |
Per @olegbespalov and @javaducky, this issue should probably be part of the StatsD project. Feel free to transfer it here: |
Closing in favor of LeonAdato/xk6-output-statsd#24 |
Brief summary
As reported several times on the forum (1, 2, 3), the percentile values users can visualize in Datadog are often wrong when compared to the end-of-test summary shown by k6.
As explained here, this is likely caused by the additional aggregation done by the DogStatsD agent, which by default only generates the
95percentile
metric, which is then aggregated again by the query used in the Datadog graph.Besides resulting in wrong values, users are unable to use raw metric data to generate any percentile value they need.
k6 version
0.41.0
OS
any
Steps to reproduce the problem
Follow the steps to setup the Datadog Agent, and run a test as explained here.
Go to the Datadog web UI and visualize the
k6.http_req_duration.max
andk6.http_req_duration.95percentile
metrics, and compare them to the end-of-test summary shown by k6. Notice that they don't match.Expected behaviour
The percentiles shown in Datadog should match the end-of-test summary shown by k6.
The user should be able to generate any percentile over raw metric data sent to Datadog. Ideally, the Datadog Agent (DogStatsD) shouldn't do any aggregation at all.
Actual behaviour
The percentiles are different, and the Datadog
95percentile
is confusing.The user can only use a limited number of metrics, and most pre-aggregated ones show wrong values.
Suggested solution
After going through the Datadog documentation, it seems it's possible to send raw data that won't be aggregated by the Datadog Agent using the distribution metric type (1, 2). This would not only avoid the aggregation, but allow users to generate any percentile value they need over the raw data.
The drawback would possibly be overloading the ingest pipeline (either of the Datadog Agent or of Datadog itself, hitting some API limits, etc.), so this needs to be thoroughly tested.
Currently we send
Count
,Gauge
and other metric types that will be aggregated, but thedatadog-go/statsd
client we use also supports theDistribution
metric.In addition to evaluating whether this change works for some of our metric types, we should also ensure that we don't break support for any other StatsD backends.
The text was updated successfully, but these errors were encountered: