Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple values for one key for a Datadog metric?

Tags:

datadog

Wondering if it's supported to have one tag for a metric have multiple values? The use case is trying to track multiple reasons a request may fail, e.g.

validation_failures: title_too_long
validation_failures: invalid_email
like image 890
djechlin Avatar asked Sep 01 '25 16:09

djechlin


1 Answers

Generally speaking, a single metric can have multiple tags that share the same "key" but with different "values. E.g, a metric point can be tagged by mykey:foo and mykey:bar.

Metrics with "competing key tags" like that are usually not a good practice, because conflicting tag values can easily add more confusion than clarity to teammates that aren't familiar with how the tags are applied. But if you're incrementing a custom "error count" metric and describing it by its cause, and if there are multiple causes, then it seems plausible that adding competing tags here might be the "right" thing to do.

(I say "generally speaking", since it probably depends on how you're creating the metrics -- if you're creating the metrics from log events or something, this may or may not work the way i'm saying it will.)

like image 151
stephenlechner Avatar answered Sep 06 '25 17:09

stephenlechner