TraceSegmentService.proto 1.5 KB
Newer Older
wu-sheng's avatar
wu-sheng 已提交
1 2 3
syntax = "proto3";

option java_multiple_files = true;
4
option java_package = "org.skywalking.apm.network.proto";
wu-sheng's avatar
wu-sheng 已提交
5

wu-sheng's avatar
wu-sheng 已提交
6
import "Downstream.proto";
7
import "KeyWithStringValue.proto";
wu-sheng's avatar
wu-sheng 已提交
8

wu-sheng's avatar
wu-sheng 已提交
9
service TraceSegmentService {
wu-sheng's avatar
wu-sheng 已提交
10
    rpc collect (stream UpstreamSegment) returns (Downstream) {
wu-sheng's avatar
wu-sheng 已提交
11 12 13
    }
}

wu-sheng's avatar
wu-sheng 已提交
14 15 16 17 18
message UpstreamSegment {
    repeated string globalTraceIds = 1;
    bytes segment = 2; // the byte array of TraceSegmentObject
}

wu-sheng's avatar
wu-sheng 已提交
19
message TraceSegmentObject {
20 21
    string traceSegmentId = 1;
    repeated TraceSegmentReference refs = 2;
wu-sheng's avatar
wu-sheng 已提交
22
    repeated SpanObject spans = 3;
wu-sheng's avatar
wu-sheng 已提交
23
    int32 applicationInstanceId = 4;
wu-sheng's avatar
wu-sheng 已提交
24
    int32 applicationInstanceId = 5;
25 26 27 28 29
}

message TraceSegmentReference {
    string parentTraceSegmentId = 1;
    int32 parentSpanId = 2;
wu-sheng's avatar
wu-sheng 已提交
30 31
    int32 parentApplicationId = 3;
    string networkAddress = 4;
32
    int32 networkAddressId = 5;
wu-sheng's avatar
wu-sheng 已提交
33 34
    string entryServiceName = 6;
    int32 entryServiceId = 7;
35 36 37 38 39 40 41 42
}

message SpanObject {
    int32 spanId = 1;
    int32 parentSpanId = 2;
    int64 startTime = 3;
    int64 endTime = 4;
    int32 operationNameId = 5;
43 44 45 46 47 48 49 50
    string operationName = 6;
    int32 peerId = 7;
    string peer = 8;
    SpanType spanType = 9;
    SpanLayer spanLayer = 10;
    int32 componentId = 11;
    string component = 12;
    bool isError = 13;
51
    repeated KeyWithStringValue tags = 14;
52
    repeated LogMessage logs = 15;
53 54 55 56 57 58 59 60 61 62 63 64
}

enum SpanType {
    Entry = 0;
    Exit = 1;
    Local = 2;
}

enum SpanLayer {
    Database = 0;
    RPCFramework = 1;
    Http = 2;
wu-sheng's avatar
wu-sheng 已提交
65
    MQ = 3;
66 67 68 69
}

message LogMessage {
    int64 time = 1;
70
    repeated KeyWithStringValue data = 2;
wu-sheng's avatar
wu-sheng 已提交
71
}