2 years ago
#67275

hello
Datadog unique occurences by one tag and creating pie chart on another tag
I have a counter metric in datadog with tags of id and type. There could be multiple occurrences of a particular id, and a specific id always has the same type. I want to get the unique id occurrences and create a pie chart by type tag.
E.g., if the occurrences are:
id type
1 a
1 a
1 a
2 a
2 a
3 b
3 b
4 b
4 b
So the counter would have 9 occurrences. I want to get a pie chart that says 2 for a (instead of 5 because there are 2 ids of type a ) and 2 for b (instead of 4 because there are 2 ids of type b ) without showing the id tag.
I know I can use:
a) clamp max(1) by id, type. But that creates a pie chart based on both id, type tags.
b) count_non_null by id, type but can't see the type tag anymore after using the function.
datadog
statsd
0 Answers
Your Answer