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 97e0ecee7e Preserve drilldown filters in direct signal links
97e0ecee7e is described below

commit 97e0ecee7ef2cadae0fc1e6aa179d37174dc1da0
Author: Logic <[email protected]>
AuthorDate: Tue Jun 9 19:51:53 2026 +0800

    Preserve drilldown filters in direct signal links
---
 web-next/lib/signal-dashboards.test.ts | 10 ++++++----
 web-next/lib/signal-dashboards.ts      | 12 +++++++++++-
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/web-next/lib/signal-dashboards.test.ts 
b/web-next/lib/signal-dashboards.test.ts
index a53ec65c43..7556770168 100644
--- a/web-next/lib/signal-dashboards.test.ts
+++ b/web-next/lib/signal-dashboards.test.ts
@@ -1824,7 +1824,7 @@ describe('signal dashboards API client', () => {
       layout: '[]',
       widgets: JSON.stringify([
         { id: 'logs-panel', signal: 'logs', title: 'Logs', visualization: 
'table', route: '/log/manage?view=table&attributeFilter=region%3Aus' },
-        { id: 'trace-panel', signal: 'traces', title: 'Trace', visualization: 
'table', route: '/trace/manage?view=table' },
+        { id: 'trace-panel', signal: 'traces', title: 'Trace', visualization: 
'table', route: 
'/trace/manage?view=table&resourceFilter=service.version%3D1.2.3' },
         { id: 'metrics-panel', signal: 'metrics', title: 'Metrics', 
visualization: 'time-series', route: '/ingestion/otlp/metrics?query=cpu' },
         { id: 'db-metrics-panel', signal: 'metrics', title: 'DB Metrics', 
visualization: 'time-series', route: 
'/ingestion/otlp/metrics?query=signoz_db_latency_count&serviceName=checkout&groupBy=db.system'
 },
         { id: 'external-metrics-panel', signal: 'metrics', title: 'External 
Metrics', visualization: 'time-series', route: 
'/ingestion/otlp/metrics?query=signoz_external_call_latency_count&serviceName=checkout&groupBy=external.service.address'
 },
@@ -1997,6 +1997,7 @@ describe('signal dashboards API client', () => {
           spanId: 'span-root',
           serviceName: 'checkout',
           serviceNamespace: 'payments',
+          resourceFilter: 'service.version=1.2.3',
           breakoutAttributes: expect.arrayContaining([
             expect.objectContaining({ name: 'resource:service.name', value: 
'checkout' }),
             expect.objectContaining({ name: 'resource:service.namespace', 
value: 'payments' }),
@@ -2005,7 +2006,7 @@ describe('signal dashboards API client', () => {
             expect.objectContaining({ name: 'resource:hertzbeat.source', 
value: 'otlp' })
           ]),
           relatedSignal: 'logs',
-          relatedHandoffHref: 
'/log/manage?traceId=trace-1&view=list&spanId=span-root&serviceName=checkout&serviceNamespace=payments&environment=prod&entityId=4200&entityType=service&entityName=Checkout+API&source=otlp&collector=collector-a&template=spring-boot&returnTo=%2Fdashboard%3Fstart%3D1000%26end%3D3000&start=1000&end=3000'
+          relatedHandoffHref: 
'/log/manage?traceId=trace-1&view=list&spanId=span-root&serviceName=checkout&serviceNamespace=payments&resourceFilter=service.version%3D1.2.3&environment=prod&entityId=4200&entityType=service&entityName=Checkout+API&source=otlp&collector=collector-a&template=spring-boot&returnTo=%2Fdashboard%3Fstart%3D1000%26end%3D3000&start=1000&end=3000'
         }),
         expect.objectContaining({
           panelId: 'trace-panel',
@@ -2017,6 +2018,7 @@ describe('signal dashboards API client', () => {
           spanId: 'span-root',
           serviceName: 'checkout',
           serviceNamespace: 'payments',
+          resourceFilter: 'service.version=1.2.3',
           breakoutAttributes: expect.arrayContaining([
             expect.objectContaining({ name: 'resource:service.name', value: 
'checkout' }),
             expect.objectContaining({ name: 'resource:service.namespace', 
value: 'payments' }),
@@ -2025,7 +2027,7 @@ describe('signal dashboards API client', () => {
             expect.objectContaining({ name: 'resource:hertzbeat.source', 
value: 'otlp' })
           ]),
           relatedSignal: 'logs',
-          relatedHandoffHref: 
'/log/manage?traceId=trace-1&view=list&spanId=span-root&serviceName=checkout&serviceNamespace=payments&environment=prod&entityId=4200&entityType=service&entityName=Checkout+API&source=otlp&collector=collector-a&template=spring-boot&returnTo=%2Fdashboard%3Fstart%3D1000%26end%3D3000&start=1000&end=3000'
+          relatedHandoffHref: 
'/log/manage?traceId=trace-1&view=list&spanId=span-root&serviceName=checkout&serviceNamespace=payments&resourceFilter=service.version%3D1.2.3&environment=prod&entityId=4200&entityType=service&entityName=Checkout+API&source=otlp&collector=collector-a&template=spring-boot&returnTo=%2Fdashboard%3Fstart%3D1000%26end%3D3000&start=1000&end=3000'
         }),
         expect.objectContaining({ panelId: 'metrics-panel', signal: 'metrics', 
source: 'metrics-point', label: 'cpu.usage', value: '0.5' }),
         expect.objectContaining({
@@ -2229,7 +2231,7 @@ describe('signal dashboards API client', () => {
     
expect(buildSignalDashboardRuntimeEvidenceSourceHandoff('/trace/manage?serviceName=payments',
 syncTooltip.rows[2], {
       timeRange: { start: '1000', end: '3000' },
       returnTo: '/dashboard?start=1000&end=3000'
-    
})).toBe('/trace/manage?serviceName=payments&traceId=trace-1&spanId=span-root&serviceNamespace=payments&environment=prod&entityId=4200&entityType=service&entityName=Checkout+API&source=otlp&collector=collector-a&template=spring-boot&returnTo=%2Fdashboard%3Fstart%3D1000%26end%3D3000&start=1000&end=3000');
+    
})).toBe('/trace/manage?serviceName=payments&traceId=trace-1&spanId=span-root&serviceNamespace=payments&resourceFilter=service.version%3D1.2.3&environment=prod&entityId=4200&entityType=service&entityName=Checkout+API&source=otlp&collector=collector-a&template=spring-boot&returnTo=%2Fdashboard%3Fstart%3D1000%26end%3D3000&start=1000&end=3000');
     
expect(buildSignalDashboardRuntimeEvidenceSourceHandoff('/trace/manage?view=list',
 syncTooltip.rows[6], {
       timeRange: { start: '1000', end: '3000' },
       returnTo: '/dashboard?start=1000&end=3000'
diff --git a/web-next/lib/signal-dashboards.ts 
b/web-next/lib/signal-dashboards.ts
index 43dcdb9a3e..83c3502386 100644
--- a/web-next/lib/signal-dashboards.ts
+++ b/web-next/lib/signal-dashboards.ts
@@ -3385,7 +3385,7 @@ function syncTooltipRelatedHandoff(
   traceId: string,
   spanId: string,
   options: SignalDashboardRuntimeSyncTooltipOptions = {},
-  context: { serviceName?: string; serviceNamespace?: string } & 
ReturnType<typeof syncTooltipRelatedContextFromBreakoutAttributes> = {
+  context: { serviceName?: string; serviceNamespace?: string } & 
ReturnType<typeof syncTooltipRelatedContextFromBreakoutAttributes> & 
ReturnType<typeof syncTooltipRouteDrilldownContext> = {
     environment: '',
     entityId: '',
     entityType: '',
@@ -3408,12 +3408,16 @@ function syncTooltipRelatedHandoff(
     if (nextSpanId) params.set('spanId', nextSpanId);
     if (serviceName) params.set('serviceName', serviceName);
     if (serviceNamespace) params.set('serviceNamespace', serviceNamespace);
+    if (context.resourceFilter) params.set('resourceFilter', 
context.resourceFilter);
+    if (context.operationName) params.set('operationName', 
context.operationName);
     applySyncTooltipRelatedContext(params, context);
     return {
       traceId: nextTraceId,
       ...(nextSpanId ? { spanId: nextSpanId } : {}),
       ...(serviceName ? { serviceName } : {}),
       ...(serviceNamespace ? { serviceNamespace } : {}),
+      ...(context.resourceFilter ? { resourceFilter: context.resourceFilter } 
: {}),
+      ...(context.operationName ? { operationName: context.operationName } : 
{}),
       relatedSignal: 'traces' as const,
       relatedHandoffHref: 
applySignalDashboardTimeRange(syncTooltipRelatedHref('/trace/manage', params, 
options.returnTo), options.timeRange)
     };
@@ -3426,12 +3430,16 @@ function syncTooltipRelatedHandoff(
     if (nextSpanId) params.set('spanId', nextSpanId);
     if (serviceName) params.set('serviceName', serviceName);
     if (serviceNamespace) params.set('serviceNamespace', serviceNamespace);
+    if (context.resourceFilter) params.set('resourceFilter', 
context.resourceFilter);
+    if (context.attributeFilter) params.set('attributeFilter', 
context.attributeFilter);
     applySyncTooltipRelatedContext(params, context);
     return {
       traceId: nextTraceId,
       ...(nextSpanId ? { spanId: nextSpanId } : {}),
       ...(serviceName ? { serviceName } : {}),
       ...(serviceNamespace ? { serviceNamespace } : {}),
+      ...(context.resourceFilter ? { resourceFilter: context.resourceFilter } 
: {}),
+      ...(context.attributeFilter ? { attributeFilter: context.attributeFilter 
} : {}),
       relatedSignal: 'logs' as const,
       relatedHandoffHref: 
applySignalDashboardTimeRange(syncTooltipRelatedHref('/log/manage', params, 
options.returnTo), options.timeRange)
     };
@@ -3859,6 +3867,7 @@ export function buildSignalDashboardRuntimeSyncTooltip(
         ...syncTooltipRelatedHandoff(renderer.signal, row.traceId, row.spanId, 
options, {
           serviceName: row.service,
           serviceNamespace: row.serviceNamespace,
+          ...syncTooltipRouteDrilldownContext(renderer.primaryUrl),
           
...syncTooltipRelatedContextFromBreakoutAttributes(row.breakoutAttributes)
         })
       }));
@@ -3879,6 +3888,7 @@ export function buildSignalDashboardRuntimeSyncTooltip(
         ...syncTooltipRelatedHandoff(renderer.signal, row.traceId, row.spanId, 
options, {
           serviceName: row.service,
           serviceNamespace: row.serviceNamespace,
+          ...syncTooltipRouteDrilldownContext(renderer.primaryUrl),
           
...syncTooltipRelatedContextFromBreakoutAttributes(row.breakoutAttributes)
         })
       }));


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

Reply via email to