Marton Greber has submitted this change and it was merged. ( 
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
Reviewed-on: http://gerrit.cloudera.org:8080/24646
Reviewed-by: Alexey Serbin <[email protected]>
Reviewed-by: Marton Greber <[email protected]>
Tested-by: Marton Greber <[email protected]>
---
M src/kudu/util/metrics-test.cc
M src/kudu/util/prometheus_writer.cc
M src/kudu/util/prometheus_writer.h
3 files changed, 45 insertions(+), 24 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved
  Marton Greber: Looks good to me, approved; Verified

--
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: merged
Gerrit-Change-Id: I23479bc3fb3c6f2ea81fd2b1727dd2bd1609a30c
Gerrit-Change-Number: 24646
Gerrit-PatchSet: 3
Gerrit-Owner: Jeison Romero <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Jeison Romero <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>

Reply via email to