Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/commands/interceptor/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.New().Sum([]byte(fmt.Sprintf("%s_%s", instanceID, name))))
id = fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprintf("%s_%s", instanceID, name))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW @mrproliu , I checked how the OAP build the process id, it’s sha256(name_instanceId), but here, it’s sha256(instanceId_name), is it a bug?

https://github.com/apache/skywalking/blob/7dccf96f30ec8a02e75523f3174540fb0b8d4c8a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/IDManager.java#L318-L319

}

return ctx.Set(idFlagName, id)
Expand Down
Loading