From b7b8d0e7be4941158f0223e7d6e4309c0ec3f88a Mon Sep 17 00:00:00 2001 From: mrproliu <741550557@qq.com> Date: Sun, 12 Jan 2020 09:18:21 +0800 Subject: [PATCH] Profile report snapshot and finish status (#12) * add profile task report snapshot and task finish status * wrapper snapshot element list to ProfileTaskSegmentStack * fix missing profile task id * remove `ProfileTaskSegemntSnapshotElement`, use code signature list * change profile stack data type to real stack --- profile/Profile.proto | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/profile/Profile.proto b/profile/Profile.proto index 8f0bf63..f42d235 100644 --- a/profile/Profile.proto +++ b/profile/Profile.proto @@ -23,6 +23,8 @@ option java_package = "org.apache.skywalking.apm.network.language.profile"; option csharp_namespace = "SkyWalking.NetworkProtocol"; import "common/common.proto"; +import "common/trace-common.proto"; +import "language-agent/Downstream.proto"; service ProfileTask { @@ -30,6 +32,14 @@ service ProfileTask { rpc getProfileTaskCommands (ProfileTaskCommandQuery) returns (Commands) { } + // collect dumped segment snapshot + rpc collectSnapshot (stream ProfileTaskSegemntSnapshot) returns (Downstream) { + } + + // report profiling task finished + rpc reportTaskFinish (ProfileTaskFinishReport) returns (Downstream) { + } + } message ProfileTaskCommandQuery { @@ -40,3 +50,32 @@ message ProfileTaskCommandQuery { // last commmand timestamp int64 lastCommandTime = 3; } + +// dumped segment snapshot +message ProfileTaskSegemntSnapshot { + // profile task id + string taskId = 1; + // dumped segment id + UniqueId traceSegmentId = 2; + // dump timestamp + int64 time = 3; + // snapshot dump sequence, start with zero + int32 sequence = 4; + // snapshot stack + ProfileTaskSegmentStack stack = 5; +} + +message ProfileTaskSegmentStack { + // snapshot code signature list + repeated string codeSignatures = 1; +} + +// profile task finished report +message ProfileTaskFinishReport { + // current sniffer information + int32 serviceId = 1; + int32 instanceId = 2; + + // profile task + string taskId = 3; +} \ No newline at end of file -- GitLab