From 40bed6281e469baed4cd3a4fccc8dd78949da6bb Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Wed, 11 Jun 2025 13:30:16 +1000 Subject: [PATCH] Clarify behaviour of metric names with `bool` modifier Based on discussion in https://github.com/prometheus/prometheus/issues/15471 Signed-off-by: Charles Korn --- docs/querying/operators.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/querying/operators.md b/docs/querying/operators.md index 2d79c638c0..ed2d4d90a8 100644 --- a/docs/querying/operators.md +++ b/docs/querying/operators.md @@ -139,6 +139,12 @@ modifier changes the behavior in the following ways: than the value `0`.) * The metric name is dropped. +If the `bool` modifier is not provided, then the metric name from the left side +is retained, with some exceptions: +* If `on` is used, then the metric name is dropped. +* If `group_right` is used, then the metric name from the right side is retained, + to avoid collisions. + ### Logical/set binary operators These logical/set binary operators are only defined between instant vectors: