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

zqr10159 pushed a commit to branch 2.0.0
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git


The following commit(s) were added to refs/heads/2.0.0 by this push:
     new dc381f1ae3 Align trace span group drilldown
dc381f1ae3 is described below

commit dc381f1ae3380c768cc03a342e70b88cfaded0fb
Author: Logic <[email protected]>
AuthorDate: Tue Jun 9 18:40:48 2026 +0800

    Align trace span group drilldown
---
 web-next/lib/signal-dashboards.test.ts | 43 ++++++++++++++++++++++++++++++++++
 web-next/lib/signal-dashboards.ts      |  2 ++
 2 files changed, 45 insertions(+)

diff --git a/web-next/lib/signal-dashboards.test.ts 
b/web-next/lib/signal-dashboards.test.ts
index c6c7cbf542..9f9d507166 100644
--- a/web-next/lib/signal-dashboards.test.ts
+++ b/web-next/lib/signal-dashboards.test.ts
@@ -3485,6 +3485,49 @@ describe('signal dashboards API client', () => {
     
expect(renderer.rows[0]?.relatedHandoffHref).not.toContain('resourceFilter=http.target');
   });
 
+  it('maps trace snake_case span groups to operation drilldown without 
creating span entities', async () => {
+    const [plan] = buildSignalDashboardExecutionPlans({
+      dashboardKey: 'signals-overview',
+      title: 'Signals overview',
+      description: 'Signals',
+      tags: 'traces',
+      layout: '[]',
+      widgets: JSON.stringify([
+        {
+          id: 'traces-span-names',
+          signal: 'traces',
+          title: 'Span names',
+          visualization: 'list',
+          route: 
'/trace/manage?serviceName=checkout&serviceNamespace=payments&environment=prod&entityId=4200&entityType=service&entityName=Checkout+API&source=otlp&collector=collector-a&template=spring-boot&spanScope=all&groupBy=span_name&groupLimit=8'
+        }
+      ])
+    });
+
+    const result = await executeSignalDashboardPanelPlan(plan, async url => {
+      
expect(url).toBe('/traces/stats/group-by?serviceName=checkout&spanScope=all&entityId=4200&entityType=service&serviceNamespace=payments&environment=prod&groupBy=span_name&limit=8');
+      return {
+        groupBy: 'span_name',
+        groups: [{
+          value: 'POST /checkout',
+          traceCount: 6,
+          errorTraceCount: 0,
+          latencyP95Ms: 125
+        }]
+      };
+    });
+    const renderer = buildSignalDashboardPanelRuntimeRenderDescriptor(plan, 
result);
+
+    expect(renderer.rows[0]).toEqual(expect.objectContaining({
+      key: 'traces-span-names:group:0',
+      title: 'POST /checkout',
+      copy: '6 traces · 0 errors',
+      meta: 'span_name · p95 125ms',
+      relatedSignal: 'traces',
+      relatedHandoffHref: 
'/trace/manage?serviceName=checkout&spanScope=all&environment=prod&entityId=4200&entityType=service&entityName=Checkout+API&serviceNamespace=payments&source=otlp&collector=collector-a&template=spring-boot&view=list&operationName=POST+%2Fcheckout'
+    }));
+    
expect(renderer.rows[0]?.relatedHandoffHref).not.toContain('resourceFilter=span_name');
+  });
+
   it('renders backend-compatible trace group payload variants', async () => {
     const [plan] = buildSignalDashboardExecutionPlans({
       dashboardKey: 'signals-overview',
diff --git a/web-next/lib/signal-dashboards.ts 
b/web-next/lib/signal-dashboards.ts
index f8a9142094..6afe43bdc1 100644
--- a/web-next/lib/signal-dashboards.ts
+++ b/web-next/lib/signal-dashboards.ts
@@ -2605,6 +2605,8 @@ function buildTraceGroupResourceExpression(groupBy: 
string, value: string) {
     normalizedGroupBy === 'operation' ||
     normalizedGroupBy === 'operation.name' ||
     normalizedGroupBy === 'span.name' ||
+    normalizedGroupBy === 'span_name' ||
+    normalizedGroupBy === 'root_span_name' ||
     normalizedGroupBy === 'http.route' ||
     normalizedGroupBy === 'http.target' ||
     normalizedGroupBy === 'http.url' ||


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to