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 ee17b7a417 Preserve log operation context in handoffs
ee17b7a417 is described below

commit ee17b7a417e8f817f5fd38f502db839537a04b15
Author: Logic <[email protected]>
AuthorDate: Wed Jun 10 09:07:38 2026 +0800

    Preserve log operation context in handoffs
---
 web-next/lib/log-manage/view-model.test.ts | 14 +++++++++++++-
 web-next/lib/log-manage/view-model.ts      |  1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/web-next/lib/log-manage/view-model.test.ts 
b/web-next/lib/log-manage/view-model.test.ts
index 0c7b4747c1..1f9651a3f1 100644
--- a/web-next/lib/log-manage/view-model.test.ts
+++ b/web-next/lib/log-manage/view-model.test.ts
@@ -722,7 +722,7 @@ describe('log view model', () => {
     expect(metricsParams.get('template')).toBe('hertzbeat-self');
   });
 
-  it('keeps selected log operation context in metrics handoffs', () => {
+  it('keeps selected log operation context in shared handoffs', () => {
     const result = buildLogHandoffLinks(
       {
         traceId: 'trace-operation',
@@ -743,10 +743,22 @@ describe('log view model', () => {
       }
     );
 
+    const traceParams = new URL(result.traceHref, 
'https://example.com').searchParams;
+    expect(traceParams.get('operationName')).toBe('POST /checkout');
+
     const metricsParams = new URL(result.metricsHref, 
'https://example.com').searchParams;
     expect(metricsParams.get('operationName')).toBe('POST /checkout');
     expect(metricsParams.get('serviceName')).toBe('checkout');
     expect(metricsParams.get('entityType')).toBe('service');
+
+    const entityHref = new URL(result.entityHref, 'https://example.com');
+    expect(entityHref.searchParams.get('operationName')).toBe('POST 
/checkout');
+
+    const alertHandlingParams = new URL(result.alertHandlingHref, 
'https://example.com').searchParams;
+    expect(alertHandlingParams.get('operationName')).toBe('POST /checkout');
+
+    const alertRuleParams = new URL(result.alertRulesHref, 
'https://example.com').searchParams;
+    expect(alertRuleParams.get('operationName')).toBe('POST /checkout');
   });
 
   it('can override trace and metrics return paths with the current log 
workspace route', () => {
diff --git a/web-next/lib/log-manage/view-model.ts 
b/web-next/lib/log-manage/view-model.ts
index d3c6949aaa..ef2536804f 100644
--- a/web-next/lib/log-manage/view-model.ts
+++ b/web-next/lib/log-manage/view-model.ts
@@ -724,6 +724,7 @@ export function buildLogHandoffLinks(
     template,
     traceId,
     spanId,
+    operationName,
     returnTo: stripReturnLabelFromHref(routeContext.returnTo),
     source: routeContext.source || 'otlp',
     start: routeContext.start || String(start),


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

Reply via email to