Yan-Daojiang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24790
Change subject: [metrics] Support quantile selection in /metrics_prometheus ...................................................................... [metrics] Support quantile selection in /metrics_prometheus Native Kudu histograms are exported in the Prometheus summary format with a fixed set of seven quantile lines (min '0', 0.75, 0.95, 0.99, 0.999, 0.9999, and max '1') plus '_sum' and '_count'. On clusters with many histogram metrics and entities, every unwanted quantile is an extra exported time series, adding to scrape payload and TSDB cardinality. This lets an operator export only the quantiles they care about. The selection is driven either per-request via the 'quantiles' query parameter (e.g. ?quantiles=0.99,0.999) or server-wide via the new --metrics_prometheus_default_quantiles flag, which is applied whenever a request does not carry its own 'quantiles'. A request parameter takes precedence over the flag. This mirrors the existing 'merge_rules' / --metrics_prometheus_default_merge_rules mechanism. An empty selection (the default) exports every quantile, so existing output is unchanged. Unknown quantile tags are ignored with a warning; if a request or flag resolves to no known tags, all quantiles are exported (fail-open). The '_sum' and '_count' lines are always exported. Only the Prometheus endpoint is affected; the JSON endpoint is untouched. Change-Id: I01b48aa30f26f2a7efcd842bf6512a023cbf90ff --- M src/kudu/server/default_path_handlers.cc M src/kudu/util/metrics-test.cc M src/kudu/util/metrics.cc M src/kudu/util/metrics.h 4 files changed, 291 insertions(+), 37 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/90/24790/1 -- To view, visit http://gerrit.cloudera.org:8080/24790 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I01b48aa30f26f2a7efcd842bf6512a023cbf90ff Gerrit-Change-Number: 24790 Gerrit-PatchSet: 1 Gerrit-Owner: Yan-Daojiang <[email protected]>
