[
https://issues.apache.org/jira/browse/KUDU-3692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18067031#comment-18067031
]
ASF subversion and git services commented on KUDU-3692:
-------------------------------------------------------
Commit 2991ce9722f692a4d964b0d92e9e200309fee2ad in kudu's branch
refs/heads/master from Yan-Daojiang
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=2991ce972 ]
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]>
> Add table attribution to tablet metrics in /metrics_prometheus
> --------------------------------------------------------------
>
> Key: KUDU-3692
> URL: https://issues.apache.org/jira/browse/KUDU-3692
> Project: Kudu
> Issue Type: Sub-task
> Components: metrics, Prometheus
> Affects Versions: 1.18.0
> Reporter: Marton Greber
> Assignee: Daojiang Yan
> Priority: Major
>
> In 1.18.0 the Prometheus exposition for tablet metrics (/metrics_prometheus)
> does not include table attribution. Tablet IDs appear in metric names (e.g.,
> kudu_tablet_<tablet_id>_live_row_count), but there are no Prometheus labels
> that allow joining a tablet to its table.
> In contrast, the JSON metrics (/metrics) expose attributes like table_id,
> table_name, and human-readable partition info under the tablet entity.
> While implementing this fix one should look into how much more work it would
> take to have "label parity" with the existing json metrics that are available.
> Supplementary:
> Root issue reported on Slack:
> "I get all the metrics per tablet. The tabletID is in the metric name
> (example: kudu_tablet_d3ef3d70f47a47fc8073593c8587f58b_live_row_count).
> Unfortunately, I can't find the mappings from a table_name to the tabletID in
> the metric name."
--
This message was sent by Atlassian Jira
(v8.20.10#820010)