diff --git a/protobuf/agent.proto b/protobuf/agent.proto new file mode 100644 index 00000000..c1ad2152 --- /dev/null +++ b/protobuf/agent.proto @@ -0,0 +1,22 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Licensed 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"; +package jaegertracing.protobuf.agent; + +import "jaeger.proto"; + +service Agent { + rpc EmitBatch(stream Batch) returns (Empty); +} diff --git a/protobuf/baggage.proto b/protobuf/baggage.proto new file mode 100644 index 00000000..1bd5eb58 --- /dev/null +++ b/protobuf/baggage.proto @@ -0,0 +1,32 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Licensed 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"; +package jaegertracing.protobuf.baggage; + +import "jaeger.proto"; + +message BaggageRestriction { + string baggage_key = 1; + int32 max_value_length = 2; +} + +message BaggageRestrictionResponse { + repeated BaggageRestriction restrictions = 1; +} + +service BaggageRestrictionManager { + rpc GetBaggageRestrictions (ServiceRequest) returns + (BaggageRestrictionResponse); +} diff --git a/protobuf/crossdock/tracetest.proto b/protobuf/crossdock/tracetest.proto new file mode 100644 index 00000000..ad7bd83e --- /dev/null +++ b/protobuf/crossdock/tracetest.proto @@ -0,0 +1,62 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Licensed 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"; +package jaegertracing.protobuf.crossdock; + +enum Transport { + HTTP = 0; + TCHANNEL = 1; + DUMMY = 2; +} + +message Downstream { + string service_name = 1; + string server_role = 2; + string host = 3; + string port = 4; + Transport transport = 5; +} + +message StartTraceRequest { + string server_role = 1; + bool sampled = 2; + string baggage = 3; + repeated Downstream downstream = 4; +} + +message JoinTraceRequest { + string server_role = 1; + repeated Downstream downstream = 2; +} + +message ObservedSpan { + string trace_id = 1; + bool sampled = 2; + string baggage = 3; +} + +message DownstreamResponse { + ObservedSpan observed_span = 1; + string not_implemented_error = 2; +} + +message TraceResponse { + repeated DownstreamResponse responses = 1; +} + +service TracedService { + rpc StartTrace (StartTraceRequest) returns (TraceResponse); + rpc JoinTrace (JoinTraceRequest) returns (TraceResponse); +} diff --git a/protobuf/jaeger.proto b/protobuf/jaeger.proto new file mode 100644 index 00000000..817a369f --- /dev/null +++ b/protobuf/jaeger.proto @@ -0,0 +1,81 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Licensed 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"; +package jaegertracing.protobuf; + +message Empty {}; + +message ServiceRequest { + string service_name = 1; +} + +message Tag { + string key = 1; + oneof value { + string str_value = 2; + double double_value = 3; + bool bool_value = 4; + int64 long_value = 5; + bytes binary_value = 6; + } +} + +message Log { + int64 timestamp = 1; + repeated Tag fields = 2; +} + +message SpanRef { + enum Type { + CHILD_OF = 0; + FOLLOWS_FROM = 1; + } + Type type = 1; + uint64 trace_id_high = 2; + uint64 trace_id_low = 3; + uint64 span_id = 4; +} + +message Span { + uint64 trace_id_high = 1; + uint64 trace_id_low = 2; + uint64 span_id = 3; + uint64 parent_span_id = 4; + string operation_name = 5; + repeated SpanRef references = 6; + int32 flags = 7; + int64 start_time = 8; + int64 duration = 9; + repeated Tag tags = 10; + repeated Log logs = 11; +} + +message Process { + string service_name = 1; + repeated Tag tags = 2; +} + +message Batch { + Process process = 1; + repeated Span spans = 2; +} + +message BatchResponse { + bool ok = 1; +}; + +service Collector { + rpc SubmitBatches (stream Batch) returns (stream BatchResponse); +} diff --git a/protobuf/sampling.proto b/protobuf/sampling.proto new file mode 100644 index 00000000..1c411f94 --- /dev/null +++ b/protobuf/sampling.proto @@ -0,0 +1,57 @@ +// Copyright (c) 2017 Uber Technologies, Inc. +// +// Licensed 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"; +package jaegertracing.protobuf.sampling_manager; + +import "jaeger.proto"; + +message ProbabilisticSamplingStrategy { + double sampling_rate = 1; +} + +message RateLimitingSamplingStrategy { + int32 max_traces_per_seconds = 1; +} + +message SamplingStrategy { + oneof strategy { + ProbabilisticSamplingStrategy probabilistic = 1; + RateLimitingSamplingStrategy rate_limiting = 2; + } +} + +message OperationSamplingStrategy { + string operation = 1; + SamplingStrategy strategy = 2; +} + +message PerOperationSamplingStrategy { + double default_sampling_probability = 1; + double default_lower_bound_traces_per_second = 2; + repeated OperationSamplingStrategy per_operation_strategy = 3; + double default_upper_bound_traces_per_second = 4; +} + +message SamplingStrategyResponse { + oneof strategy { + ProbabilisticSamplingStrategy probabilistic = 1; + RateLimitingSamplingStrategy rate_limiting = 2; + PerOperationSamplingStrategy per_operation = 3; + } +} + +service SamplingManager { + rpc GetSamplingStrategy (ServiceRequest) returns (SamplingStrategyResponse); +}