Yaroslav Tkachenko created FLINK-25164:
------------------------------------------

             Summary: DogStatsD Metrics Reporter
                 Key: FLINK-25164
                 URL: https://issues.apache.org/jira/browse/FLINK-25164
             Project: Flink
          Issue Type: New Feature
          Components: Runtime / Metrics
            Reporter: Yaroslav Tkachenko


At the moment Flink doesn't have a metrics reporter that can work with very 
popular DataDog agents out of the box. DataDog agents use DogStatsD protocol 
which is a superset of StatsD. The existing StatsDReporter is too limited to be 
useful. 

https://issues.apache.org/jira/browse/FLINK-7009 attempted to address this 
issue by introducing a separate mode in the StatsDReporter, however, I don't 
believe it's possible to extend it to support DogStatsD due to a few core 
differences:
 * ALL metrics in StatsDReporter are reported as gauges, which makes counters 
wrong
 * Negative values are interpreted as reductions instead of absolute values, 
which is not true in the case of DogStatsD
 * The list of histogram metrics is not compatible with [the way they're 
represented in 
Datadog|https://docs.datadoghq.com/developers/metrics/types/?tab=histogram]

I think this warrants having separate metrics reporter dedicated to DogStatsD 
protocol.

Also, most of the changes originally proposed in 
https://issues.apache.org/jira/browse/FLINK-7009 are still relevant:
 * convert output to ascii alphanumeric characters with underbar, delimited by 
periods. Runs of invalid characters within a metric segment would be collapsed 
to a single underbar.
 * report all Flink variables as tags
 * compress overly long segments, say over 50 chars, to a symbolic 
representation of the metric name, to preserve the unique metric time series 
but avoid downstream truncation
 * compress 32 character Flink IDs like tm_id, task_id, job_id, 
task_attempt_id, to the first 8 characters, again to preserve enough 
distinction amongst metrics while trimming up to 96 characters from the metric
 * remove object references from names, such as the instance hash id of the 
serializer



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to