From 88567cc173d01aa0aa96df9d0d1963184b276e33 Mon Sep 17 00:00:00 2001 From: mrproliu <741550557@qq.com> Date: Mon, 21 Apr 2025 12:05:41 +0800 Subject: [PATCH] Fix wrong process id format --- CHANGES.md | 2 ++ internal/commands/interceptor/process.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index fa7d53ee..70bed05b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,8 @@ Release Notes. ### Bug Fixes +* Fix wrong process id format by @mrproliu in https://github.com/apache/skywalking-cli/pull/215 + 0.14.0 ------------------ diff --git a/internal/commands/interceptor/process.go b/internal/commands/interceptor/process.go index 9fbc7f29..fd808559 100644 --- a/internal/commands/interceptor/process.go +++ b/internal/commands/interceptor/process.go @@ -83,7 +83,7 @@ func parseProcess(required bool, idFlagName, nameFlagName, instanceIDFlagName st if instanceID == "" { return fmt.Errorf(`"--%s" is specified but its related service name or id is not given`, nameFlagName) } - id = fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprintf("%s_%s", instanceID, name)))) + id = fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprintf("%s_%s", name, instanceID)))) } return ctx.Set(idFlagName, id)