Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
Signed-off-by: Isaac Hier <ihier@uber.com>
  • Loading branch information
Isaac Hier committed Dec 5, 2017
1 parent e8958ef commit 3f7eb2f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 76 deletions.
4 changes: 1 addition & 3 deletions protobuf/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ import "jaeger.proto";

message Empty {};

service Agent {
rpc EmitBatch(stream Batch) returns (Empty);
}
service Agent { rpc EmitBatch(stream Batch) returns (Empty); }
14 changes: 6 additions & 8 deletions protobuf/baggage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,17 @@ option (gogoproto.testgen_all) = true;
option (gogoproto.benchgen_all) = true;

message BaggageRestriction {
string baggage_key = 1;
int32 max_value_length = 2;
string baggage_key = 1;
int32 max_value_length = 2;
}

message BaggageRestrictionRequest {
string service_name = 1;
}
message BaggageRestrictionRequest { string service_name = 1; }

message BaggageRestrictionResponse {
repeated BaggageRestriction restrictions = 1;
repeated BaggageRestriction restrictions = 1;
}

service BaggageRestrictionManager {
rpc GetBaggageRestrictions (stream BaggageRestrictionRequest) returns
(stream BaggageRestrictionResponse);
rpc GetBaggageRestrictions(stream BaggageRestrictionRequest)
returns (stream BaggageRestrictionResponse);
}
76 changes: 37 additions & 39 deletions protobuf/jaeger.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,65 +21,63 @@ option (gogoproto.testgen_all) = true;
option (gogoproto.benchgen_all) = true;

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;
}
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;
int64 timestamp = 1;
repeated Tag fields = 2;
}

message TraceID {
uint64 high = 1;
uint64 low = 2;
uint64 high = 1;
uint64 low = 2;
}

message SpanRef {
enum Type {
CHILD_OF = 0;
FOLLOWS_FROM = 1;
}
Type type = 1;
TraceID trace_id = 2 [(gogoproto.nullable) = false,
(gogoproto.embed) = true];
uint64 span_id = 3;
enum Type {
CHILD_OF = 0;
FOLLOWS_FROM = 1;
}
Type type = 1;
TraceID trace_id = 2
[ (gogoproto.nullable) = false, (gogoproto.embed) = true ];
uint64 span_id = 3;
}

message Span {
TraceID trace_id = 1 [(gogoproto.nullable) = false,
(gogoproto.embed) = true];
uint64 span_id = 2;
uint64 parent_span_id = 3;
string operation_name = 4;
repeated SpanRef references = 5;
int32 flags = 6;
int64 start_time = 7;
int64 duration = 8;
repeated Tag tags = 9;
repeated Log logs = 10;
TraceID trace_id = 1
[ (gogoproto.nullable) = false, (gogoproto.embed) = true ];
uint64 span_id = 2;
uint64 parent_span_id = 3;
string operation_name = 4;
repeated SpanRef references = 5;
int32 flags = 6;
int64 start_time = 7;
int64 duration = 8;
repeated Tag tags = 9;
repeated Log logs = 10;
}

message Process {
string service_name = 1;
repeated Tag tags = 2;
string service_name = 1;
repeated Tag tags = 2;
}

message Batch {
Process process = 1;
repeated Span spans = 2;
Process process = 1;
repeated Span spans = 2;
}

message BatchResponse {
bool ok = 1;
};
message BatchResponse { bool ok = 1; };

service Collector {
rpc SubmitBatches (stream Batch) returns (stream BatchResponse);
rpc SubmitBatches(stream Batch) returns (stream BatchResponse);
}
46 changes: 20 additions & 26 deletions protobuf/sampling.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,36 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.testgen_all) = true;
option (gogoproto.benchgen_all) = true;

message ProbabilisticSamplingStrategy {
double sampling_rate = 1;
}
message ProbabilisticSamplingStrategy { double sampling_rate = 1; }

message RateLimitingSamplingStrategy {
int32 max_traces_per_seconds = 1;
}
message RateLimitingSamplingStrategy { int32 max_traces_per_seconds = 1; }

message PerOperationSamplingStrategy {
message OperationSamplingStrategy {
string operation = 1;
oneof strategy {
ProbabilisticSamplingStrategy probabilistic = 2;
RateLimitingSamplingStrategy rate_limiting = 3;
}
message OperationSamplingStrategy {
string operation = 1;
oneof strategy {
ProbabilisticSamplingStrategy probabilistic = 2;
RateLimitingSamplingStrategy rate_limiting = 3;
}
}

double default_sampling_probability = 1;
double default_lower_bound_traces_per_second = 2;
double default_upper_bound_traces_per_second = 3;
repeated OperationSamplingStrategy per_operation_strategy = 4;
double default_sampling_probability = 1;
double default_lower_bound_traces_per_second = 2;
double default_upper_bound_traces_per_second = 3;
repeated OperationSamplingStrategy per_operation_strategy = 4;
}

message SamplingStrategyRequest {
string service_name = 1;
}
message SamplingStrategyRequest { string service_name = 1; }

message SamplingStrategyResponse {
oneof strategy {
ProbabilisticSamplingStrategy probabilistic = 1;
RateLimitingSamplingStrategy rate_limiting = 2;
PerOperationSamplingStrategy per_operation = 3;
}
oneof strategy {
ProbabilisticSamplingStrategy probabilistic = 1;
RateLimitingSamplingStrategy rate_limiting = 2;
PerOperationSamplingStrategy per_operation = 3;
}
}

service SamplingManager {
rpc GetSamplingStrategy (stream SamplingStrategyRequest) returns
(stream SamplingStrategyResponse);
rpc GetSamplingStrategy(stream SamplingStrategyRequest)
returns (stream SamplingStrategyResponse);
}

0 comments on commit 3f7eb2f

Please sign in to comment.