From e6bcbe5f615b30cb8c90ff02496eb1b7a499823f Mon Sep 17 00:00:00 2001 From: cqhasy <3181940782@qq.com> Date: Sun, 20 Jul 2025 09:23:55 +0800 Subject: [PATCH 1/7] feat(add go profile method) --- profile/Profile.proto | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/profile/Profile.proto b/profile/Profile.proto index 3abdb3a..1f1f9b9 100644 --- a/profile/Profile.proto +++ b/profile/Profile.proto @@ -36,7 +36,8 @@ service ProfileTask { // collect dumped thread snapshot rpc collectSnapshot (stream ThreadSnapshot) returns (Commands) { } - + // collect bytes profile data from go agent + rpc goProfileReport(stream GoProfileData)returns(Commands){} // report profiling task finished rpc reportTaskFinish (ProfileTaskFinishReport) returns (Commands) { } @@ -80,3 +81,15 @@ message ProfileTaskFinishReport { // profile task string taskId = 3; } + +// profile for go agent +message GoProfileData{ + string taskId = 1; + string traceId=2; + string endPointName=3; + int64 minDurationThreshold=4; + // the truly profile data + bytes payload=5; + // check last part true or false + bool isLast = 6; +} From 87283427ee8edacc0b397e0b05b4072156e2ba20 Mon Sep 17 00:00:00 2001 From: cqhasy <3181940782@qq.com> Date: Fri, 1 Aug 2025 10:39:06 +0800 Subject: [PATCH 2/7] fix(profile proto delete some thing) --- profile/Profile.proto | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/profile/Profile.proto b/profile/Profile.proto index 1f1f9b9..2be722e 100644 --- a/profile/Profile.proto +++ b/profile/Profile.proto @@ -85,11 +85,9 @@ message ProfileTaskFinishReport { // profile for go agent message GoProfileData{ string taskId = 1; - string traceId=2; - string endPointName=3; - int64 minDurationThreshold=4; + string traceSegmentId=2; // the truly profile data - bytes payload=5; + bytes payload=3; // check last part true or false - bool isLast = 6; + bool isLast = 4; } From a26fa44b3a1925d446f126bc456cee433bcd6338 Mon Sep 17 00:00:00 2001 From: cqhasy <3181940782@qq.com> Date: Sun, 3 Aug 2025 16:09:10 +0800 Subject: [PATCH 3/7] feat(add profile for go agent) --- profile/Profile.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profile/Profile.proto b/profile/Profile.proto index 2be722e..84c5091 100644 --- a/profile/Profile.proto +++ b/profile/Profile.proto @@ -90,4 +90,8 @@ message GoProfileData{ bytes payload=3; // check last part true or false bool isLast = 4; + // Span IDs with duration greater than minDuration,only in the last chunk + repeated int32 spanIds=5; + // use to reassemble fragments + int32 chunkId = 6; } From 7eb43b0f0d03cb290aaabd1be5ede75355659377 Mon Sep 17 00:00:00 2001 From: cqhasy <3181940782@qq.com> Date: Mon, 11 Aug 2025 20:51:15 +0800 Subject: [PATCH 4/7] fix(adapt to agent with ctx) --- profile/Profile.proto | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/profile/Profile.proto b/profile/Profile.proto index 84c5091..67ad1bb 100644 --- a/profile/Profile.proto +++ b/profile/Profile.proto @@ -85,13 +85,10 @@ message ProfileTaskFinishReport { // profile for go agent message GoProfileData{ string taskId = 1; - string traceSegmentId=2; // the truly profile data - bytes payload=3; + bytes payload=2; // check last part true or false - bool isLast = 4; - // Span IDs with duration greater than minDuration,only in the last chunk - repeated int32 spanIds=5; + bool isLast = 3; // use to reassemble fragments - int32 chunkId = 6; + int32 chunkId = 4; } From 9d8df27e0a49aad373d6bacae1715f53f59392fe Mon Sep 17 00:00:00 2001 From: cqhasy <3181940782@qq.com> Date: Mon, 11 Aug 2025 22:33:48 +0800 Subject: [PATCH 5/7] fix(delete chunkId in goProfileData) --- profile/Profile.proto | 2 -- 1 file changed, 2 deletions(-) diff --git a/profile/Profile.proto b/profile/Profile.proto index 67ad1bb..0a1f694 100644 --- a/profile/Profile.proto +++ b/profile/Profile.proto @@ -89,6 +89,4 @@ message GoProfileData{ bytes payload=2; // check last part true or false bool isLast = 3; - // use to reassemble fragments - int32 chunkId = 4; } From e9afabebc3eb3ffabb33d54fdaa24f2a2954a10c Mon Sep 17 00:00:00 2001 From: cqhasy <3181940782@qq.com> Date: Tue, 12 Aug 2025 09:05:22 +0800 Subject: [PATCH 6/7] fix(format the proto) --- profile/Profile.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile/Profile.proto b/profile/Profile.proto index 0a1f694..a02c591 100644 --- a/profile/Profile.proto +++ b/profile/Profile.proto @@ -86,7 +86,7 @@ message ProfileTaskFinishReport { message GoProfileData{ string taskId = 1; // the truly profile data - bytes payload=2; + bytes payload = 2; // check last part true or false bool isLast = 3; } From db180a7c74371c5162153fc4410fb7dac812a677 Mon Sep 17 00:00:00 2001 From: cqhasy <3181940782@qq.com> Date: Tue, 12 Aug 2025 09:10:13 +0800 Subject: [PATCH 7/7] fix(format proto rpc) --- profile/Profile.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profile/Profile.proto b/profile/Profile.proto index a02c591..988c819 100644 --- a/profile/Profile.proto +++ b/profile/Profile.proto @@ -37,7 +37,8 @@ service ProfileTask { rpc collectSnapshot (stream ThreadSnapshot) returns (Commands) { } // collect bytes profile data from go agent - rpc goProfileReport(stream GoProfileData)returns(Commands){} + rpc goProfileReport (stream GoProfileData) returns (Commands) { + } // report profiling task finished rpc reportTaskFinish (ProfileTaskFinishReport) returns (Commands) { }