Sending individual scenario threshold metrics to Datadog

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