|
| 1 | +// Copyright 2018, OpenCensus Authors |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +// NOTE: This proto is experimental and is subject to change at this point. |
| 18 | +// Please do not use it at the moment. |
| 19 | + |
| 20 | +package opencensus.proto.agent.trace.v1; |
| 21 | + |
| 22 | +import "opencensus/proto/agent/common/v1/common.proto"; |
| 23 | +import "opencensus/proto/trace/v1/trace.proto"; |
| 24 | +import "opencensus/proto/trace/v1/trace_config.proto"; |
| 25 | + |
| 26 | +option java_multiple_files = true; |
| 27 | +option java_package = "io.opencensus.proto.agent.trace.v1"; |
| 28 | +option java_outer_classname = "TraceServiceProto"; |
| 29 | + |
| 30 | +option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1"; |
| 31 | + |
| 32 | +service TraceService { |
| 33 | + |
| 34 | + // After the initialization this RPC must be kept alive for the |
| 35 | + // entire life of the application. Agent pushes configs to the |
| 36 | + // application via a stream of responses. |
| 37 | + rpc Config(stream ConfigTraceServiceRequest) returns (stream ConfigTraceServiceResponse) {} |
| 38 | + |
| 39 | + // Allow to export Spans. |
| 40 | + // For performance reason, it is recommended to keep this RPC |
| 41 | + // alive for the entire life of the application. |
| 42 | + rpc Export(stream ExportTraceServiceRequest) returns (stream ExportTraceServiceResponse) {} |
| 43 | +} |
| 44 | + |
| 45 | +message ConfigTraceServiceRequest { |
| 46 | + // Identifier data effectively is a structured metadata. |
| 47 | + // This is required only in the first message on the stream. |
| 48 | + opencensus.proto.agent.common.v1.Node node = 1; |
| 49 | + |
| 50 | + // Current configuration. |
| 51 | + opencensus.proto.trace.v1.TraceConfig config = 2; |
| 52 | +} |
| 53 | + |
| 54 | +message ConfigTraceServiceResponse { |
| 55 | + // Requested updated configuration. |
| 56 | + opencensus.proto.trace.v1.TraceConfig config = 2; |
| 57 | +} |
| 58 | + |
| 59 | +message ExportTraceServiceRequest { |
| 60 | + // Identifier data effectively is a structured metadata. |
| 61 | + // This is required only in the first message on the stream. |
| 62 | + opencensus.proto.agent.common.v1.Node node = 1; |
| 63 | + |
| 64 | + repeated opencensus.proto.trace.v1.Span spans = 2; |
| 65 | +} |
| 66 | + |
| 67 | +message ExportTraceServiceResponse { |
| 68 | +} |
0 commit comments