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 fbbf6c7f80 Suggest operation filters from signal evidence
fbbf6c7f80 is described below

commit fbbf6c7f80e210c2e8371af7e5e3988b72387a04
Author: Logic <[email protected]>
AuthorDate: Tue Jun 9 19:35:02 2026 +0800

    Suggest operation filters from signal evidence
---
 web-next/lib/signal-dashboards.test.ts | 19 +++++++++++++++++++
 web-next/lib/signal-dashboards.ts      |  5 +++++
 2 files changed, 24 insertions(+)

diff --git a/web-next/lib/signal-dashboards.test.ts 
b/web-next/lib/signal-dashboards.test.ts
index 78af0e2c9c..52af4c51fb 100644
--- a/web-next/lib/signal-dashboards.test.ts
+++ b/web-next/lib/signal-dashboards.test.ts
@@ -2117,6 +2117,13 @@ describe('signal dashboards API client', () => {
       expect.objectContaining({ variableName: 'hertzbeat.collector', value: 
'collector-a', source: 'collector' }),
       expect.objectContaining({ variableName: 'hertzbeat.template', value: 
'spring-boot', source: 'template' })
     ]);
+    expect(buildSignalDashboardRuntimeEvidenceFilters([
+      { name: 'operation.name', type: 'query', value: '' },
+      { name: 'service.name', type: 'query', value: '' }
+    ], syncTooltip.rows[6])).toEqual([
+      expect.objectContaining({ variableName: 'operation.name', value: 'POST 
/checkout', source: 'operation' }),
+      expect.objectContaining({ variableName: 'service.name', value: 
'checkout', source: 'service' })
+    ]);
     expect(buildSignalDashboardRuntimeEvidenceFilterSuggestions([], 
syncTooltip.rows[0])).toEqual([
       expect.objectContaining({ variableName: 'service.name', value: 
'checkout', source: 'service', variableType: 'query' }),
       expect.objectContaining({ variableName: 'service.namespace', value: 
'payments', source: 'serviceNamespace', variableType: 'query' }),
@@ -2155,6 +2162,18 @@ describe('signal dashboards API client', () => {
       expect.objectContaining({ variableName: 'hertzbeat.collector', value: 
'collector-a', source: 'collector', variableType: 'dynamic' }),
       expect.objectContaining({ variableName: 'hertzbeat.template', value: 
'spring-boot', source: 'template', variableType: 'dynamic' })
     ]);
+    expect(buildSignalDashboardRuntimeEvidenceFilterSuggestions([], 
syncTooltip.rows[6])).toEqual([
+      expect.objectContaining({ variableName: 'service.name', value: 
'checkout', source: 'service', variableType: 'query' }),
+      expect.objectContaining({ variableName: 'service.namespace', value: 
'payments', source: 'serviceNamespace', variableType: 'query' }),
+      expect.objectContaining({ variableName: 'deployment.environment.name', 
value: 'prod', source: 'environment', variableType: 'query' }),
+      expect.objectContaining({ variableName: 'operation.name', value: 'POST 
/checkout', source: 'operation', variableType: 'query' }),
+      expect.objectContaining({ variableName: 'hertzbeat.entity_id', value: 
'4200', source: 'entityId', variableType: 'textbox' }),
+      expect.objectContaining({ variableName: 'hertzbeat.entity_type', value: 
'service', source: 'entityType', variableType: 'dynamic' }),
+      expect.objectContaining({ variableName: 'hertzbeat.entity_name', value: 
'Checkout API', source: 'entityName', variableType: 'query' }),
+      expect.objectContaining({ variableName: 'hertzbeat.source', value: 
'otlp', source: 'signalSource', variableType: 'dynamic' }),
+      expect.objectContaining({ variableName: 'hertzbeat.collector', value: 
'collector-a', source: 'collector', variableType: 'dynamic' }),
+      expect.objectContaining({ variableName: 'hertzbeat.template', value: 
'spring-boot', source: 'template', variableType: 'dynamic' })
+    ]);
     expect(syncTooltip.rows[4].breakoutAttributes).toEqual([
       expect.objectContaining({ name: 'service.name', value: 'checkout' }),
       expect.objectContaining({ name: 'service.namespace', value: 'payments' 
}),
diff --git a/web-next/lib/signal-dashboards.ts 
b/web-next/lib/signal-dashboards.ts
index 9320230601..009234337a 100644
--- a/web-next/lib/signal-dashboards.ts
+++ b/web-next/lib/signal-dashboards.ts
@@ -309,6 +309,7 @@ export type SignalDashboardRuntimeEvidenceFilterSource =
   | 'service'
   | 'serviceNamespace'
   | 'environment'
+  | 'operation'
   | 'traceId'
   | 'spanId'
   | 'entityId'
@@ -3609,6 +3610,7 @@ function syncTooltipMetricRelatedHandoff(
 const SERVICE_VARIABLE_NAMES = new Set(['service.name', 'servicename', 
'service']);
 const SERVICE_NAMESPACE_VARIABLE_NAMES = new Set(['service.namespace', 
'servicenamespace', 'service_namespace']);
 const ENVIRONMENT_VARIABLE_NAMES = new Set(['deployment.environment.name', 
'deployment_environment_name', 'environment']);
+const OPERATION_VARIABLE_NAMES = new Set(['operation.name', 'operationname', 
'operation_name', 'operation']);
 const TRACE_ID_VARIABLE_NAMES = new Set(['traceid', 'trace.id', 'trace_id']);
 const SPAN_ID_VARIABLE_NAMES = new Set(['spanid', 'span.id', 'span_id']);
 const ENTITY_ID_VARIABLE_NAMES = new Set(['hertzbeat.entity_id', 
'hertzbeat.entity.id', 'entityid', 'entity.id', 'entity_id']);
@@ -3623,6 +3625,7 @@ function evidenceFilterSourceForVariableName(name: 
string): SignalDashboardRunti
   if (SERVICE_VARIABLE_NAMES.has(normalizedName)) return 'service';
   if (SERVICE_NAMESPACE_VARIABLE_NAMES.has(normalizedName)) return 
'serviceNamespace';
   if (ENVIRONMENT_VARIABLE_NAMES.has(normalizedName)) return 'environment';
+  if (OPERATION_VARIABLE_NAMES.has(normalizedName)) return 'operation';
   if (TRACE_ID_VARIABLE_NAMES.has(normalizedName)) return 'traceId';
   if (SPAN_ID_VARIABLE_NAMES.has(normalizedName)) return 'spanId';
   if (ENTITY_ID_VARIABLE_NAMES.has(normalizedName)) return 'entityId';
@@ -3643,6 +3646,7 @@ function evidenceFilterValues(row: 
SignalDashboardRuntimeSyncTooltipRow): Record
     service: row.signal === 'metrics' ? syncTooltipIdentifier(row.serviceName) 
: row.signal === 'logs' || row.signal === 'traces' ? 
syncTooltipIdentifier(row.label) : '',
     serviceNamespace: syncTooltipIdentifier(row.serviceNamespace),
     environment: breakoutValue(row, ['deployment.environment.name', 
'environment']),
+    operation: syncTooltipIdentifier(row.operationName),
     traceId: syncTooltipIdentifier(row.traceId),
     spanId: syncTooltipIdentifier(row.spanId),
     entityId: breakoutValue(row, ['hertzbeat.entity_id', 
'hertzbeat.entity.id', 'entity.id', 'entity_id']),
@@ -3742,6 +3746,7 @@ export function 
buildSignalDashboardRuntimeEvidenceFilterSuggestions(
     { source: 'service', variableName: 'service.name', variableType: 'query' },
     { source: 'serviceNamespace', variableName: 'service.namespace', 
variableType: 'query' },
     { source: 'environment', variableName: 'deployment.environment.name', 
variableType: 'query' },
+    { source: 'operation', variableName: 'operation.name', variableType: 
'query' },
     { source: 'entityId', variableName: 'hertzbeat.entity_id', variableType: 
'textbox' },
     { source: 'entityType', variableName: 'hertzbeat.entity_type', 
variableType: 'dynamic' },
     { source: 'entityName', variableName: 'hertzbeat.entity_name', 
variableType: 'query' },


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

Reply via email to