This is an automated email from the ASF dual-hosted git repository.

liuhan pushed a commit to branch fix-process-id-format
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git

commit 88567cc173d01aa0aa96df9d0d1963184b276e33
Author: mrproliu <741550...@qq.com>
AuthorDate: Mon Apr 21 12:05:41 2025 +0800

    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 fa7d53e..70bed05 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 9fbc7f2..fd80855 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)

Reply via email to