ddanielr commented on PR #3600: URL: https://github.com/apache/accumulo/pull/3600#issuecomment-1633050452
https://github.com/apache/accumulo/blob/0733d3ae86cae082faab9b40b46bb55149e0852f/core/src/main/java/org/apache/accumulo/core/metrics/MetricsProducer.java#L609-L610 The `_` separator is used here because most of our metric testing is done using Graphite which has a hierarchical metric structure. By adding metrics names using a `_` separator, we can define a multi-word line as a single metric in the Graphite hierarchy. ``` accumulo.fate accumulo.fate.ops accumulo.fate.ops.in_progress accumulo.fate.ops.in_progress_by_type ``` However, micrometer uses a flat metrics structure and requires dot notation for all metric names due to conversion on registry types. [Metric Naming](https://micrometer.io/docs/concepts#_naming_meters) Because of this, the metric name ends up being multiple items in the Graphite hierarchy. ``` accumulo.fate accumulo.fate.ops accumulo.fate.ops.in accumulo.fate.ops.in.progress accumulo.fate.ops.in.progress.by accumulo.fate.ops.in.progress.by.type ``` Vs the metric creation in a flat metrics systems like Prometheus. ``` accumulo_fate_ops_in_progress accumulo_fate_ops_in_progress_by_type ``` If we want to be fully compliant with micrometer's conversion ability, then we have to only use dot notation in our metric names. We could add MeterFilters to our statsd sink to rewrite any metrics we want to have as a single metric. This seems like the "quick and easy" solution, but not really the "simple" solution long term as any other metric sink would need to understand and implement these MeterFilters if they wanted their metrics to look the same. It looks like micrometer supports some interesting conversions with labels for hierarchical systems (See micrometer's [HierarchicalNameMapper](https://github.com/micrometer-metrics/micrometer/blob/0dc111d1f6d3aa288dda24ac0912cbb483f1da1e/micrometer-core/src/main/java/io/micrometer/core/instrument/util/HierarchicalNameMapper.java#L35)) which fully rewrites the metric name. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
