Jeison Romero has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24646
Change subject: KUDU-3775: relax entity type restriction in Prometheus labels ...................................................................... KUDU-3775: relax entity type restriction in Prometheus labels BuildPrometheusLabels() previously DCHECKed that entity_type was one of "server", "table", or "tablet", rejecting any other entity type (e.g. synthetic test entities such as "test_entity"). This made it impossible to use the entity-labels Prometheus format with anything outside those three built-in types. Remove the DCHECK and rename the internal helper from BuildTableTabletPrometheusLabels to BuildGenericPrometheusLabels, reflecting that it now handles any entity type other than "server" generically: it emits entity_type and entity_id as-is, along with any recognized attributes, without asserting on the type value. Convert MetricsTest.PrometheusFilterByEntityLevel from the legacy Prometheus format (previously required as a workaround, since it uses test_entity) to the entity-labels format now that this is possible. Add a dedicated regression test, PrometheusEntityLabelsArbitraryEntityType, that specifically verifies correct label output for a non-standard entity type. Change-Id: I23479bc3fb3c6f2ea81fd2b1727dd2bd1609a30c --- M src/kudu/util/metrics-test.cc M src/kudu/util/prometheus_writer.cc M src/kudu/util/prometheus_writer.h 3 files changed, 43 insertions(+), 23 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/46/24646/1 -- To view, visit http://gerrit.cloudera.org:8080/24646 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I23479bc3fb3c6f2ea81fd2b1727dd2bd1609a30c Gerrit-Change-Number: 24646 Gerrit-PatchSet: 1 Gerrit-Owner: Jeison Romero <[email protected]>
