Yan-Daojiang has posted comments on this change. ( http://gerrit.cloudera.org:8080/24779 )
Change subject: [metrics] Support merge_rules aggregation in /metrics_prometheus ...................................................................... Patch Set 2: (5 comments) Thanks for the review! I've addressed all the comments in the new patchset. PTAL. The pre_commit failure appears to be an environment issue on the Jenkins slave, not related to this patch. http://gerrit.cloudera.org:8080/#/c/24779/1/src/kudu/server/default_path_handlers.cc File src/kudu/server/default_path_handlers.cc: http://gerrit.cloudera.org:8080/#/c/24779/1/src/kudu/server/default_path_handlers.cc@523 PS1, Line 523: : ParseMergeRules(ParseArray(req.parsed_args, kMerg > Does it make sense at least to report on invalid input for the setting prov Done. Added a validator. The flag and its parsing logic were moved into metrics.cc to make this testable. http://gerrit.cloudera.org:8080/#/c/24779/1/src/kudu/server/default_path_handlers.cc@552 PS1, Line 552: > nit: maybe, create a static/constexpr constant and use it here and elsewher Done http://gerrit.cloudera.org:8080/#/c/24779/1/src/kudu/util/metrics-test.cc File src/kudu/util/metrics-test.cc: PS1: > I couldn't find scenarios that would involve taking aggregation rules from Done, added three tests: * PrometheusDefaultMergeRulesFromFlagTest: flag default applied when the request carries no rules; * PrometheusRequestMergeRulesOverrideFlagTest: request rules override the flag; * PrometheusMalformedDefaultMergeRulesFlagTest: a malformed flag yields no aggregation, while a valid rule sharing the value still applies). http://gerrit.cloudera.org:8080/#/c/24779/1/src/kudu/util/metrics-test.cc@417 PS1, Line 417: } > Is there any interest in adding test for aggregation based on the 'partitio Done. Added MergedPrometheusByPartitionAttributeTest, which aggregates by a partition attribute such as HASH (col_x) PARTITION 3, verifying that tablets sharing a partition collapse into one summed series, distinct partitions stay separate, and the space/paren-containing value is emitted verbatim as the id label. http://gerrit.cloudera.org:8080/#/c/24779/1/src/kudu/util/metrics.cc File src/kudu/util/metrics.cc: http://gerrit.cloudera.org:8080/#/c/24779/1/src/kudu/util/metrics.cc@131 PS1, Line 131: val->prototype()->name(), val->prototype()->descriptio > nit: maybe, explicitly pre-compute this string outside of the enclosing 'fo Done -- To view, visit http://gerrit.cloudera.org:8080/24779 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I76a365de3b328f2beefd460626cc0c896537e713 Gerrit-Change-Number: 24779 Gerrit-PatchSet: 2 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]> Gerrit-Comment-Date: Thu, 03 Sep 2026 08:57:26 +0000 Gerrit-HasComments: Yes
