Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24096 )
Change subject: KUDU-3692 Export entity attributes as Prometheus labels ...................................................................... KUDU-3692 Export entity attributes as Prometheus labels Add a runtime flag, --prometheus_use_entity_labels (default false), to control the Prometheus exposition format. When enabled, entity identity and part of 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 Reviewed-on: http://gerrit.cloudera.org:8080/24096 Reviewed-by: Alexey Serbin <[email protected]> Reviewed-by: Marton Greber <[email protected]> Tested-by: Marton Greber <[email protected]> --- M src/kudu/master/master.cc M src/kudu/tserver/tablet_server.cc 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 8 files changed, 585 insertions(+), 128 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved Marton Greber: Looks good to me, but someone else must approve; Verified -- 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: merged Gerrit-Change-Id: I690918d06f19c393369b8fc43c3ec90dd2231d3d Gerrit-Change-Number: 24096 Gerrit-PatchSet: 5 Gerrit-Owner: Yan-Daojiang <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Yan-Daojiang <[email protected]>
