diff --git a/profile/Profile.proto b/profile/Profile.proto index 8f0bf63936398943a419c08c16210c96e6d2d66a..f42d2352c5b2c4d9822d875f8edfd8f56be6a143 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