Yan-Daojiang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24096
Change subject: [WIP] Export entity attributes as Prometheus labels ...................................................................... [WIP] Export entity attributes as Prometheus labels Add a runtime flag, --prometheus_use_entity_labels (default true), to control the Prometheus exposition format. When enabled, entity identity and attributes are exported as labels instead of being embedded in metric names, improving Prometheus naming compliance and enabling aggregation by entity attributes. This change also: - Deduplicates HELP/TYPE lines for metrics shared across many entities. - Escapes Prometheus label values (\, ", and newlines). - Ensures histogram _sum/_count lines carry labels and unit_type. - Keeps the legacy, prefix-based format when the flag is disabled. Update Prometheus-related unit/integration tests and the output checker to validate the new format and preserve legacy coverage. Change-Id: I690918d06f19c393369b8fc43c3ec90dd2231d3d --- M src/kudu/util/metrics-test.cc M src/kudu/util/metrics.cc M src/kudu/util/metrics.h M src/kudu/util/prometheus_writer.cc M src/kudu/util/prometheus_writer.h M src/kudu/util/test_util.cc 6 files changed, 333 insertions(+), 110 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/96/24096/1 -- To view, visit http://gerrit.cloudera.org:8080/24096 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I690918d06f19c393369b8fc43c3ec90dd2231d3d Gerrit-Change-Number: 24096 Gerrit-PatchSet: 1 Gerrit-Owner: Yan-Daojiang <[email protected]>
