diff --git a/language-agent/Tracing.proto b/language-agent/Tracing.proto index e4abc64e440eda04007f88f0c5ca4958aab0efbd..8f123b1cf10aca4b148715d39a9c819eb35c58cf 100644 --- a/language-agent/Tracing.proto +++ b/language-agent/Tracing.proto @@ -28,8 +28,18 @@ import "common/Common.proto"; // Define a trace segment report service. // All language agents or any trace collecting component, could use this service to send span collection to the SkyWalking OAP backend. service TraceSegmentReportService { + // Recommended trace segment report channel. + // gRPC streaming provides better performance. + // All language agents should choose this. rpc collect (stream SegmentObject) returns (Commands) { } + + // An alternative for trace report by using gRPC unary + // This is provided for some 3rd-party integration, if and only if they prefer the unary mode somehow. + // The performance of SkyWalking OAP server would be very similar with streaming report, + // the performance of the network and client side are affected + rpc collectInSync (SegmentCollection) returns (Commands) { + } } // The segment is a collection of spans. It includes all collected spans in a simple one request context, such as a HTTP request process. @@ -203,4 +213,9 @@ enum SpanLayer { MQ = 4; // A cache layer, used in tracing the cache client component. Cache = 5; +} + +// The segment collections for trace report in batch and sync mode. +message SegmentCollection { + repeated SegmentObject segments = 1; } \ No newline at end of file