From 15af3e6b73f91295b71fe5db92cf34864718c150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Tue, 5 Mar 2024 13:57:59 +0800 Subject: [PATCH 1/2] Add a statement for MAL practice. --- docs/en/concepts-and-designs/mal.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/concepts-and-designs/mal.md b/docs/en/concepts-and-designs/mal.md index 50ff6decc676..43f236445ca0 100644 --- a/docs/en/concepts-and-designs/mal.md +++ b/docs/en/concepts-and-designs/mal.md @@ -175,6 +175,14 @@ instance_trace_count{az="az-1"} 133 // 100 + 33 instance_trace_count{az="az-3"} 20 ``` +___ +**Note, aggregation operations affect the samples for one bulk only. If the metrics are reported parallel from multiple instances/nodes +through different SampleFamily, this aggregation would NOT work.** + +In the best practice for this scenario, build the metric with labels that represent each instance/node. Then use the +[AggregateLabels Operation in MQE](../api/metrics-query-expression.md#aggregatelabels-operation) to aggregate the metrics. +___ + ### Function `Duration` is a textual representation of a time range. The formats accepted are based on the ISO-8601 duration format {@code PnDTnHnMn.nS} From 8f31bc0d78769de18dc34b949742ea2acffe6326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Tue, 5 Mar 2024 13:59:43 +0800 Subject: [PATCH 2/2] Update mal.md --- docs/en/concepts-and-designs/mal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/concepts-and-designs/mal.md b/docs/en/concepts-and-designs/mal.md index 43f236445ca0..6a57b3b165d8 100644 --- a/docs/en/concepts-and-designs/mal.md +++ b/docs/en/concepts-and-designs/mal.md @@ -176,7 +176,7 @@ instance_trace_count{az="az-3"} 20 ``` ___ -**Note, aggregation operations affect the samples for one bulk only. If the metrics are reported parallel from multiple instances/nodes +**Note, aggregation operations affect the samples from one bulk only. If the metrics are reported parallel from multiple instances/nodes through different SampleFamily, this aggregation would NOT work.** In the best practice for this scenario, build the metric with labels that represent each instance/node. Then use the