There's some work that I'm involved with on migrating an elixir application from https://hexdocs.pm/statix/Statix.html to use the telemetry module and this library for recording telemetry, and sending them to datadog. statix supported a list of tags, which could be ["tag1:value", "tag1:secondvalue", "tag2"].
With the telemetry module and telemetry_metrics_statsd, we can send a telemetry metric with metadata such as:
%{type: failed, reason: [reason1, reason2]}
The reason list is being converted to a string by the datadog formatter, and then the datagram looks like:
The main downside of that is that in datadog dashboards, the reason field is one string, so it's not as clean looking. When you have multiple tag values, you can do queries on reason:reason1, compared to now doing a string search of reason:reason1. As well, when displaying a table of the tag, it will show up as reason1, reason2 automatically if there's multiple tag values.
The changes in this pull request detect a list and then take each item in the list as a new tag value so the datagram looks like the first example of
To give some context, datadog supports receiving multiple tag values with the same key, so you could have a dogstatsd datagram such as:
There's some work that I'm involved with on migrating an elixir application from https://hexdocs.pm/statix/Statix.html to use the telemetry module and this library for recording telemetry, and sending them to datadog. statix supported a list of tags, which could be ["tag1:value", "tag1:secondvalue", "tag2"].
With the telemetry module and telemetry_metrics_statsd, we can send a telemetry metric with metadata such as:
The reason list is being converted to a string by the datadog formatter, and then the datagram looks like:
The main downside of that is that in datadog dashboards, the reason field is one string, so it's not as clean looking. When you have multiple tag values, you can do queries on reason:reason1, compared to now doing a string search of reason:reason1. As well, when displaying a table of the tag, it will show up as reason1, reason2 automatically if there's multiple tag values.
The changes in this pull request detect a list and then take each item in the list as a new tag value so the datagram looks like the first example of
If these changes shouldn't be the default, it could also be put behind a config parameter when setting up TelemetryMetricsStatsd