syntax = "proto3"; option java_multiple_files = true; option java_package = "org.skywalking.apm.network.trace.proto"; import "Downstream.proto"; service TraceSegmentService { rpc collect (stream TraceSegmentObject) returns (Downstream) { } } message UpstreamSegment { repeated string globalTraceIds = 1; bytes segment = 2; // the byte array of TraceSegmentObject } message TraceSegmentObject { string traceSegmentId = 1; repeated TraceSegmentReference refs = 2; repeated SpanObject spans = 3; int32 applicationId = 4; int32 applicationInstanceId = 5; repeated string globalTraceIds = 6; } message TraceSegmentReference { string parentTraceSegmentId = 1; int32 parentSpanId = 2; int32 parentApplicationId = 3; string networkAddress = 4; int32 networkAddressId = 5; } message SpanObject { int32 spanId = 1; int32 parentSpanId = 2; int64 startTime = 3; int64 endTime = 4; int32 operationNameId = 5; int32 peerId = 6; string peer = 7; SpanType spanType = 8; SpanLayer spanLayer = 9; string component = 10; bool isError = 11; repeated KeyValue tags = 12; repeated LogMessage logs = 13; } enum SpanType { Entry = 0; Exit = 1; Local = 2; } enum SpanLayer { Database = 0; RPCFramework = 1; Http = 2; MQ = 3; } message KeyValue { string key = 1; string value = 2; } message LogMessage { int64 time = 1; repeated KeyValue data = 2; }