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

wankai 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 e96583d64e OAP Self Observability: make Trace analysis metrics 
separate by label `protocol`, add Zipkin span dropped metrics. (#13531)
e96583d64e is described below

commit e96583d64e13528cb16a96a537da9d3b4010eeea
Author: Wan Kai <[email protected]>
AuthorDate: Tue Sep 30 15:39:39 2025 +0800

    OAP Self Observability: make Trace analysis metrics separate by label 
`protocol`, add Zipkin span dropped metrics. (#13531)
---
 docs/en/changes/changes.md                         |  1 +
 .../src/main/resources/otel-rules/oap.yaml         |  8 ++--
 .../general/general-root.json                      |  2 +-
 .../so11y_oap/so11y-instance.json                  | 50 ++++++++++++++++------
 ...ntile.yml => metrics-has-value-label-trace.yml} | 45 +++++++------------
 .../expected/metrics-has-value-percentile.yml      |  4 ++
 test/e2e-v2/cases/so11y/so11y-cases.yaml           |  2 +-
 test/e2e-v2/script/env                             |  2 +-
 8 files changed, 64 insertions(+), 50 deletions(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 5b0d9e8227..b28a5656a4 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -104,6 +104,7 @@
 * Aggregate TopN Slow SQL by service dimension.
 * BanyanDB: support add group prefix (namespace) for BanyanDB groups.
 * BanyanDB: fix when setting `@BanyanDB.TimestampColumn`, the column should 
not be indexed.
+* OAP Self Observability: make Trace analysis metrics separate by label 
`protocol`, add Zipkin span dropped metrics.
 
 #### UI
 
diff --git a/oap-server/server-starter/src/main/resources/otel-rules/oap.yaml 
b/oap-server/server-starter/src/main/resources/otel-rules/oap.yaml
index b411f50eb9..6c71522af0 100644
--- a/oap-server/server-starter/src/main/resources/otel-rules/oap.yaml
+++ b/oap-server/server-starter/src/main/resources/otel-rules/oap.yaml
@@ -51,11 +51,13 @@ metricsRules:
       .tag({tags -> if (tags['gc'] == 'PS Scavenge' || tags['gc'] == 'Copy' || 
tags['gc'] == 'ParNew' || tags['gc'] == 'G1 Young Generation') {tags.gc = 
'young_gc_time'} })
       .tag({tags -> if (tags['gc'] == 'PS MarkSweep' || tags['gc'] == 
'MarkSweepCompact' || tags['gc'] == 'ConcurrentMarkSweep' || tags['gc'] == 'G1 
Old Generation') {tags.gc = 'old_gc_time'} })
   - name: instance_trace_count
-    exp: trace_in_latency_count.sum(['service', 'host_name']).increase('PT1M')
+    exp: trace_in_latency_count.sum(['service', 'host_name', 
'protocol']).increase('PT1M')
   - name: instance_trace_latency_percentile
-    exp: trace_in_latency.sum(['le', 'service', 
'host_name']).increase('PT1M').histogram().histogram_percentile([50,70,90,99])
+    exp: trace_in_latency.sum(['le', 'service', 'host_name', 
'protocol']).increase('PT1M').histogram().histogram_percentile([50,70,90,99])
   - name: instance_trace_analysis_error_count
-    exp: trace_analysis_error_count.sum(['service', 
'host_name']).increase('PT1M')
+    exp: trace_analysis_error_count.sum(['service', 'host_name', 
'protocol']).increase('PT1M')
+  - name: instance_spans_dropped_count
+    exp: spans_dropped_count.sum(['service', 'host_name', 
'protocol']).increase('PT1M')
   - name: instance_mesh_count
     exp: mesh_analysis_latency_count.sum(['service', 
'host_name']).increase('PT1M')
   - name: instance_mesh_latency_percentile
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-root.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-root.json
index a18f4947c2..95c09f0e83 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-root.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/general/general-root.json
@@ -158,7 +158,7 @@
                   "x": 0,
                   "y": 0,
                   "w": 24,
-                  "h": 49,
+                  "h": 48,
                   "i": "0",
                   "type": "Trace"
                 }
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-instance.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-instance.json
index 852ac36f56..a1837e0521 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-instance.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-instance.json
@@ -649,7 +649,7 @@
                   ]
                 },
                 {
-                  "x": 12,
+                  "x": 18,
                   "y": 0,
                   "w": 6,
                   "h": 13,
@@ -676,8 +676,8 @@
                   ]
                 },
                 {
-                  "x": 18,
-                  "y": 0,
+                  "x": 0,
+                  "y": 13,
                   "w": 6,
                   "h": 13,
                   "i": "12",
@@ -698,7 +698,7 @@
                   ]
                 },
                 {
-                  "x": 0,
+                  "x": 6,
                   "y": 13,
                   "w": 6,
                   "h": 13,
@@ -725,7 +725,7 @@
                   ]
                 },
                 {
-                  "x": 12,
+                  "x": 18,
                   "y": 13,
                   "w": 6,
                   "h": 13,
@@ -747,7 +747,7 @@
                   ]
                 },
                 {
-                  "x": 6,
+                  "x": 0,
                   "y": 26,
                   "w": 6,
                   "h": 13,
@@ -774,8 +774,8 @@
                   ]
                 },
                 {
-                  "x": 0,
-                  "y": 39,
+                  "x": 12,
+                  "y": 26,
                   "w": 6,
                   "h": 13,
                   "i": "20",
@@ -796,8 +796,8 @@
                   }
                 },
                 {
-                  "x": 12,
-                  "y": 26,
+                  "x": 0,
+                  "y": 39,
                   "w": 6,
                   "h": 13,
                   "i": "21",
@@ -823,7 +823,7 @@
                   ]
                 },
                 {
-                  "x": 0,
+                  "x": 6,
                   "y": 26,
                   "w": 6,
                   "h": 13,
@@ -867,8 +867,8 @@
                   }
                 },
                 {
-                  "x": 18,
-                  "y": 13,
+                  "x": 6,
+                  "y": 39,
                   "w": 6,
                   "h": 13,
                   "i": "24",
@@ -889,7 +889,7 @@
                   }
                 },
                 {
-                  "x": 6,
+                  "x": 12,
                   "y": 13,
                   "w": 6,
                   "h": 13,
@@ -906,6 +906,28 @@
                     "meter_oap_instance_k8s_als_streams",
                     "meter_oap_instance_k8s_als_error_streams"
                   ]
+                },
+                {
+                  "x": 12,
+                  "y": 0,
+                  "w": 6,
+                  "h": 13,
+                  "i": "26",
+                  "type": "Widget",
+                  "widget": {
+                    "title": "Zipkin Span Dropped Count (Per Minute)"
+                  },
+                  "graph": {
+                    "type": "Line",
+                    "step": false,
+                    "smooth": false,
+                    "showSymbol": true,
+                    "showXAxis": true,
+                    "showYAxis": true
+                  },
+                  "expressions": [
+                    "meter_oap_instance_spans_dropped_count"
+                  ]
                 }
               ]
             }
diff --git a/test/e2e-v2/cases/so11y/expected/metrics-has-value-percentile.yml 
b/test/e2e-v2/cases/so11y/expected/metrics-has-value-label-trace.yml
similarity index 60%
copy from test/e2e-v2/cases/so11y/expected/metrics-has-value-percentile.yml
copy to test/e2e-v2/cases/so11y/expected/metrics-has-value-label-trace.yml
index e20e27ebe6..3d05bc8de8 100644
--- a/test/e2e-v2/cases/so11y/expected/metrics-has-value-percentile.yml
+++ b/test/e2e-v2/cases/so11y/expected/metrics-has-value-label-trace.yml
@@ -17,35 +17,20 @@ debuggingtrace: null
 type: TIME_SERIES_VALUES
 results:
   {{- contains .results }}
-- metric:
-    labels:
-      - key: p
-        value: "90"
-  values:
-    {{- contains .values }}
-    - id: {{ notEmpty .id }}
-      value: {{ .value }}
-      owner: null
-      traceid: null
-    - id: {{ notEmpty .id }}
-      value: null
-      owner: null
-      traceid: null
-    {{- end}}
-- metric:
-    labels:
-      - key: p
-        value: "99"
-  values:
-    {{- contains .values }}
-    - id: {{ notEmpty .id }}
-      value: {{ .value }}
-      traceid: null
-      owner: null
-    - id: {{ notEmpty .id }}
-      value: null
-      traceid: null
-      owner: null
-    {{- end }}
+  - metric:
+      labels:
+        - key: protocol
+          value: grpc
+    values:
+      {{- contains .values }}
+      - id: {{ notEmpty .id }}
+        value: {{ .value }}
+        owner: null
+        traceid: null
+      - id: {{ notEmpty .id }}
+        value: null
+        owner: null
+        traceid: null
+      {{- end}}
   {{- end}}
 error: null
diff --git a/test/e2e-v2/cases/so11y/expected/metrics-has-value-percentile.yml 
b/test/e2e-v2/cases/so11y/expected/metrics-has-value-percentile.yml
index e20e27ebe6..516a18f7a5 100644
--- a/test/e2e-v2/cases/so11y/expected/metrics-has-value-percentile.yml
+++ b/test/e2e-v2/cases/so11y/expected/metrics-has-value-percentile.yml
@@ -21,6 +21,8 @@ results:
     labels:
       - key: p
         value: "90"
+      - key: protocol
+        value: grpc
   values:
     {{- contains .values }}
     - id: {{ notEmpty .id }}
@@ -36,6 +38,8 @@ results:
     labels:
       - key: p
         value: "99"
+      - key: protocol
+        value: grpc
   values:
     {{- contains .values }}
     - id: {{ notEmpty .id }}
diff --git a/test/e2e-v2/cases/so11y/so11y-cases.yaml 
b/test/e2e-v2/cases/so11y/so11y-cases.yaml
index 1771da920d..63379b3478 100644
--- a/test/e2e-v2/cases/so11y/so11y-cases.yaml
+++ b/test/e2e-v2/cases/so11y/so11y-cases.yaml
@@ -29,7 +29,7 @@
     - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression=meter_oap_instance_jvm_memory_bytes_used 
--instance-name=http://localhost:1234 --service-name=oap-server
       expected: expected/metrics-has-memory-value-label.yml
     - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression=meter_oap_instance_trace_count 
--instance-name=http://localhost:1234 --service-name=oap-server
-      expected: expected/metrics-has-value.yml
+      expected: expected/metrics-has-value-label-trace.yml
     - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression="meter_oap_instance_metrics_aggregation{level='L1 aggregation'}" 
--instance-name=http://localhost:1234 --service-name=oap-server
       expected: expected/metrics-has-value-label.yml
     - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression=meter_oap_instance_persistence_prepare_count 
--instance-name=http://localhost:1234 --service-name=oap-server
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/script/env
index fd89d8ee12..a24200eadf 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/script/env
@@ -23,7 +23,7 @@ 
SW_AGENT_CLIENT_JS_COMMIT=af0565a67d382b683c1dbd94c379b7080db61449
 SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016
 SW_KUBERNETES_COMMIT_SHA=6fe5e6f0d3b7686c6be0457733e825ee68cb9b35
 SW_ROVER_COMMIT=79292fe07f17f98f486e0c4471213e1961fb2d1d
-SW_BANYANDB_COMMIT=ac67a23cdbf9c36cd679699c1d7957724c83cce0
+SW_BANYANDB_COMMIT=a3fc5bc16e8c9c3385beb41dcef8b988314ff58d
 SW_AGENT_PHP_COMMIT=d1114e7be5d89881eec76e5b56e69ff844691e35
 SW_PREDICTOR_COMMIT=54a0197654a3781a6f73ce35146c712af297c994
 

Reply via email to