Profile.proto 2.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

syntax = "proto3";

option java_multiple_files = true;
wu-sheng's avatar
wu-sheng 已提交
22
option java_package = "org.apache.skywalking.apm.network.language.profile.v3";
23 24
option csharp_namespace = "SkyWalking.NetworkProtocol";

wu-sheng's avatar
wu-sheng 已提交
25
import "common/Common.proto";
26 27 28 29

service ProfileTask {

    // query all sniffer need to execute profile task commands
wu-sheng's avatar
wu-sheng 已提交
30
    rpc getProfileTaskCommands (ProfileTaskCommandQuery) returns (Commands) {
31 32
    }

33
    // collect dumped thread snapshot
wu-sheng's avatar
wu-sheng 已提交
34
    rpc collectSnapshot (stream ThreadSnapshot) returns (Commands) {
35 36 37
    }

    // report profiling task finished
wu-sheng's avatar
wu-sheng 已提交
38
    rpc reportTaskFinish (ProfileTaskFinishReport) returns (Commands) {
39 40
    }

41 42 43 44
}

message ProfileTaskCommandQuery {
    // current sniffer information
wu-sheng's avatar
wu-sheng 已提交
45 46
    string service = 1;
    string serviceInstance = 2;
47

K
kezhenxu94 已提交
48
    // last command timestamp
49 50
    int64 lastCommandTime = 3;
}
51

52 53
// dumped thread snapshot
message ThreadSnapshot {
54 55 56
    // profile task id
    string taskId = 1;
    // dumped segment id
wu-sheng's avatar
wu-sheng 已提交
57
    string traceSegmentId = 2;
58 59 60 61 62
    // dump timestamp
    int64 time = 3;
    // snapshot dump sequence, start with zero
    int32 sequence = 4;
    // snapshot stack
63
    ThreadStack stack = 5;
64 65
}

66 67
message ThreadStack {
    // stack code signature list
68 69 70 71 72 73
    repeated string codeSignatures = 1;
}

// profile task finished report
message ProfileTaskFinishReport {
    // current sniffer information
wu-sheng's avatar
wu-sheng 已提交
74 75
    string service = 1;
    string serviceInstance = 2;
76 77 78 79

    // profile task
    string taskId = 3;
}