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 d58654052f Align trace target group drilldown
d58654052f is described below

commit d58654052f9e8a0229a3bb6be542436c37791593
Author: Logic <[email protected]>
AuthorDate: Tue Jun 9 18:34:53 2026 +0800

    Align trace target group drilldown
---
 web-next/lib/signal-dashboards.test.ts | 43 ++++++++++++++++++++++++++++++++++
 web-next/lib/signal-dashboards.ts      |  6 ++++-
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/web-next/lib/signal-dashboards.test.ts 
b/web-next/lib/signal-dashboards.test.ts
index 4e92b21bb9..c6c7cbf542 100644
--- a/web-next/lib/signal-dashboards.test.ts
+++ b/web-next/lib/signal-dashboards.test.ts
@@ -3442,6 +3442,49 @@ describe('signal dashboards API client', () => {
     
expect(renderer.rows[0]?.relatedHandoffHref).not.toContain('resourceFilter=http.route');
   });
 
+  it('maps trace http target groups to operation drilldown without creating 
target entities', async () => {
+    const [plan] = buildSignalDashboardExecutionPlans({
+      dashboardKey: 'signals-overview',
+      title: 'Signals overview',
+      description: 'Signals',
+      tags: 'traces',
+      layout: '[]',
+      widgets: JSON.stringify([
+        {
+          id: 'traces-targets',
+          signal: 'traces',
+          title: 'HTTP targets',
+          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=http.target&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=http.target&limit=8');
+      return {
+        groupBy: 'http.target',
+        groups: [{
+          value: '/checkout/42',
+          traceCount: 4,
+          errorTraceCount: 1,
+          latencyP95Ms: 95
+        }]
+      };
+    });
+    const renderer = buildSignalDashboardPanelRuntimeRenderDescriptor(plan, 
result);
+
+    expect(renderer.rows[0]).toEqual(expect.objectContaining({
+      key: 'traces-targets:group:0',
+      title: '/checkout/42',
+      copy: '4 traces · 1 errors',
+      meta: 'http.target · p95 95ms',
+      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=%2Fcheckout%2F42'
+    }));
+    
expect(renderer.rows[0]?.relatedHandoffHref).not.toContain('resourceFilter=http.target');
+  });
+
   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 28ef5a52f6..f8a9142094 100644
--- a/web-next/lib/signal-dashboards.ts
+++ b/web-next/lib/signal-dashboards.ts
@@ -2606,8 +2606,12 @@ function buildTraceGroupResourceExpression(groupBy: 
string, value: string) {
     normalizedGroupBy === 'operation.name' ||
     normalizedGroupBy === 'span.name' ||
     normalizedGroupBy === 'http.route' ||
+    normalizedGroupBy === 'http.target' ||
+    normalizedGroupBy === 'http.url' ||
     normalizedGroupBy === 'route' ||
-    normalizedGroupBy === 'attribute:http.route'
+    normalizedGroupBy === 'attribute:http.route' ||
+    normalizedGroupBy === 'attribute:http.target' ||
+    normalizedGroupBy === 'attribute:http.url'
   ) {
     return { kind: 'operation' as const, value: normalizedValue };
   }


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

Reply via email to