From b912a45220354bc96a843dfb6ecaf5d1e69b47de Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@victoriametrics.com>
Date: Sat, 2 Mar 2024 03:36:00 +0200
Subject: [PATCH] docs/stream-aggregation.md: remove superflouous
 output_relabel_configs from the config example for histogram aggregation

---
 docs/stream-aggregation.md | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/docs/stream-aggregation.md b/docs/stream-aggregation.md
index 4f9553a28c..c17bd7d2fe 100644
--- a/docs/stream-aggregation.md
+++ b/docs/stream-aggregation.md
@@ -339,9 +339,6 @@ metrics with different `vmrange` or `le` labels. As they're counters, the applic
   interval: 1m
   without: [instance]
   outputs: [total]
-  output_relabel_configs:
-    - source_labels: [__name__]
-      target_label: __name__
 ```
 
 This config generates the following output metrics according to [output metric naming](#output-metric-names):
@@ -352,15 +349,12 @@ http_request_duration_seconds_bucket:1m_without_instance_total{le="0.2"} value2
 http_request_duration_seconds_bucket:1m_without_instance_total{le="0.4"} value3
 http_request_duration_seconds_bucket:1m_without_instance_total{le="1"}   value4
 http_request_duration_seconds_bucket:1m_without_instance_total{le="3"}   value5
-http_request_duration_seconds_bucket:1m_without_instance_total{le="8"}   value6
-http_request_duration_seconds_bucket:1m_without_instance_total{le="20"}  value7
-http_request_duration_seconds_bucket:1m_without_instance_total{le="60"}  value8
-http_request_duration_seconds_bucket:1m_without_instance_total{le="120"} value9
-http_request_duration_seconds_bucket:1m_without_instance_total{le="+Inf" value10
+http_request_duration_seconds_bucket:1m_without_instance_total{le="+Inf" value6
 ```
 
-The resulting metrics can be used in [histogram_quantile](https://docs.victoriametrics.com/MetricsQL.html#histogram_quantile)
+The resulting metrics can be passed to [histogram_quantile](https://docs.victoriametrics.com/MetricsQL.html#histogram_quantile)
 function:
+
 ```metricsql
 histogram_quantile(0.9, sum(rate(http_request_duration_seconds_bucket:1m_without_instance_total[5m])) by(le))
 ```
@@ -372,7 +366,6 @@ have no such requirement.
 See [the list of aggregate output](#aggregation-outputs), which can be specified at `output` field.
 See also [histograms over input metrics](#histograms-over-input-metrics) and [quantiles over input metrics](#quantiles-over-input-metrics).
 
-
 ## Output metric names
 
 Output metric names for stream aggregation are constructed according to the following pattern:
@@ -414,6 +407,14 @@ For example, the following config removes the `:1m_sum_samples` suffix added [to
     regex: "(.+):.+"
 ```
 
+Another option to remove the suffix, which is added by stream aggregation, is to add `keep_metric_names: true` to the config:
+
+```yaml
+- interval: 1m
+  outputs: [sum_samples]
+  keep_metric_names: true
+```
+
 ## Aggregation outputs
 
 The aggregations are calculated during the `interval` specified in the [config](#stream-aggregation-config)