You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/03/20 08:43:18 UTC

[skywalking] branch master updated: [BUG] otel k8s-cluster rule, add namespace dimension for MAL aggregation calculation(Deployment Status,Deployment Spec Replicas) (#10563)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 3662b01365 [BUG] otel k8s-cluster rule, add namespace dimension for MAL aggregation calculation(Deployment Status,Deployment Spec Replicas) (#10563)
3662b01365 is described below

commit 3662b01365dccdf1cb8db68b4f785eebf0d93ef7
Author: innerpeacez <in...@gmail.com>
AuthorDate: Mon Mar 20 16:43:01 2023 +0800

    [BUG] otel k8s-cluster rule, add namespace dimension for MAL aggregation calculation(Deployment Status,Deployment Spec Replicas) (#10563)
---
 docs/en/changes/changes.md                                            | 1 +
 .../server-starter/src/main/resources/otel-rules/k8s/k8s-cluster.yaml | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 810e21a8de..a2c8424448 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -13,6 +13,7 @@
 * Fix component ID of topology overlap due to storage layer bugs.
 * [Breaking Change] Enhance JDBC storage through merging tables and managing day-based table rolling.
 * [Breaking Change] Sharding-MySQL implementations and tests get removed due to we have the day-based rolling mechanism by default
+* Fix otel k8s-cluster rule add namespace dimension for MAL aggregation calculation(Deployment Status,Deployment Spec Replicas)
 
 #### Documentation
 
diff --git a/oap-server/server-starter/src/main/resources/otel-rules/k8s/k8s-cluster.yaml b/oap-server/server-starter/src/main/resources/otel-rules/k8s/k8s-cluster.yaml
index 8310351653..b141d5c391 100644
--- a/oap-server/server-starter/src/main/resources/otel-rules/k8s/k8s-cluster.yaml
+++ b/oap-server/server-starter/src/main/resources/otel-rules/k8s/k8s-cluster.yaml
@@ -66,9 +66,9 @@ metricsRules:
   - name: deployment_total
     exp: kube_deployment_labels.sum(['cluster'])
   - name: deployment_status
-    exp: kube_deployment_status_condition.valueEqual(1).tagMatch('condition' , 'Available').sum(['cluster' , 'deployment' ,'condition' , 'status']).tag({tags -> tags.remove('condition')})
+    exp: kube_deployment_status_condition.valueEqual(1).tagMatch('condition' , 'Available').sum(['cluster' , 'deployment' , 'namespace' ,'condition' , 'status']).tag({tags -> tags.remove('condition')})
   - name: deployment_spec_replicas
-    exp: kube_deployment_spec_replicas.sum(['cluster' , 'deployment'])
+    exp: kube_deployment_spec_replicas.sum(['cluster' , 'deployment' , 'namespace'])
 
   - name: service_total
     exp: kube_service_info.sum(['cluster'])