From 75ccddd4a7bc1a006e938db0a893d05634519614 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Tue, 26 Nov 2024 03:12:01 +0000 Subject: [PATCH] add complex value alternative Signed-off-by: David Ashpole --- proposals/2024-09-25_metadata-labels.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/proposals/2024-09-25_metadata-labels.md b/proposals/2024-09-25_metadata-labels.md index 7ba99d1..2aa3cce 100644 --- a/proposals/2024-09-25_metadata-labels.md +++ b/proposals/2024-09-25_metadata-labels.md @@ -54,7 +54,7 @@ For example: When a query for a metric returns multiple metrics with a different `__type__` or `__unit__` label, but the same `__name__`, users see a warning in the UI. -Users don't see the `__type__` or `__unit__` labels in the Prometheus UI next to other labels, but the unit displayed next to the value. +Users don't see the `__type__` or `__unit__` labels in the Prometheus UI next to other labels by default. Users see no difference to exposition formats. @@ -114,6 +114,15 @@ This solution is not chosen because: * Users might be surprised by, or dislike the additional suffixes and delimiters in the metric name results * Mitigation: Opt-in for query engines? +### Type and Unit in complex value types + +Unlike other metric types, native histograms are a complex type and contain many fields in a single value. The metric type and unit could be added as fields of a complex value type in a similar way. + +This solution is not chosen because: + +* Requires intrusive changes to all formats (text, proto, etc.). +* Requires new PromQL syntax for querying the type and unit. + ### "Hide" __type__ and __unit__ labels in PromQL, instead of UI Existing UIs don't handle the `__type__` and `__unit__` labels. To mitigate this, PromQL could omit the `__type__` and `__unit__` labels from the query response. Doing this would avoid requiring UIs to update to handle the new labels.