Hello,
Is there a recommended way to send threshold metrics to Datadog with a setup that looks like this:
Thresholds per scenario:
"thresholds": {
"http_req_duration{scenario:1}": ["p(95)<400"],
"http_req_failed{scenario:1}": ["rate<0.01"],
}
I am sending the corresponding tags as a param in the api request for my scenarios and can confirm that k6 recognizes these per scenario thresholds. However, I am confused on how to send these to datadog since it looks like they do not get sent automatically. I’ve tried hooking into data.metrics in the handleSummary function and sending metrics as a Trend object to no avail.
Hi @ataylor1,
I’m not sure if I got fully your question, let me try to clarify a couple of concepts.
Do you want to visualize metrics or thresholds? They are different concepts, one is the value collected, the other tracks if a specific metric crossed a pre-set condition.
This is not necessary, k6 tags automatically all your metrics by default with the running scenario
.
Are you using the statsd
metric output or something else to send the data to Datadog?
Hi @codebien,
I’d like to visualize the thresholds. I am using the statsd agent to send data to Datadog. Let me know if you need any further clarification. Thanks
Hey @ataylor1,
sorry for the late reply.
Can you please clarify this point, how do you send data from k6 to the statsd
agent? Are you using k6’s statsd metric output?
The statsd output isn’t supported anymore by the k6 core team. The unique officially supported output capable of flushing to Datadog is the OpenTelemetry output. Would you be open to use it? Eventually, we might consider adding this feature to it.
Hi @codebien,
I am using this plugin: GitHub - LeonAdato/xk6-output-statsd: k6 extension to output real-time test metrics using StatsD. . As recommended by the k6 datadog documentation found here: Datadog | Grafana k6 documentation . But yes, I would be open to switching to a more recommended tool.
Thank you