Skip to content

Commit 229dc03

Browse files
mahadzaryab1amol-verma-allen
authored andcommitted
[chore] Remove gogoproto annotations from trace_storage.proto and dependency_storage.proto (jaegertracing#6819)
<!-- !! Please DELETE this comment before posting. We appreciate your contribution to the Jaeger project! 👋🎉 --> ## Which problem is this PR solving? - Towards jaegertracing#6789 ## Description of the changes - This PR removes the gogoproto annotations from `trace_storage.proto` and `dependency_storage.proto` to avoid introducing a dependency on gogo for users. Instead, it uses a similar patching mechanism to api_v3 to add the annotations when generating the *.pb.go files. ## How was this change tested? - CI ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
1 parent e29ea65 commit 229dc03

File tree

6 files changed

+3409
-200
lines changed

6 files changed

+3409
-200
lines changed

internal/storage/v2/grpc/dependency_storage.proto

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ option go_package = "storage";
99

1010
message GetDependenciesRequest {
1111
// start_time is the start of the time interval to search for the dependencies.
12-
google.protobuf.Timestamp start_time = 1 [
13-
(gogoproto.stdtime) = true,
14-
(gogoproto.nullable) = false
15-
];
12+
google.protobuf.Timestamp start_time = 1;
1613
// end_time is the end of the time interval to search for the dependencies.
17-
google.protobuf.Timestamp end_time = 2 [
18-
(gogoproto.stdtime) = true,
19-
(gogoproto.nullable) = false
20-
];
14+
google.protobuf.Timestamp end_time = 2;
2115
}
2216

2317
// Dependency represents a relationship between two services.
@@ -36,7 +30,7 @@ message Dependency {
3630
}
3731

3832
message GetDependenciesResponse {
39-
repeated Dependency dependencies = 1 [(gogoproto.nullable) = false];
33+
repeated Dependency dependencies = 1;
4034
}
4135

4236
service DependencyReader {

internal/storage/v2/grpc/trace_storage.proto

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ syntax = "proto3";
22

33
package jaeger.storage.v2;
44

5-
import "gogoproto/gogo.proto";
65
import "google/protobuf/duration.proto";
76
import "google/protobuf/timestamp.proto";
87
import "opentelemetry/proto/trace/v1/trace.proto";
@@ -17,12 +16,12 @@ message GetTraceParams {
1716
// start_time is the start of the time interval to search for the trace_id.
1817
//
1918
// This field is optional.
20-
google.protobuf.Timestamp start_time = 2 [(gogoproto.stdtime) = true];
19+
google.protobuf.Timestamp start_time = 2;
2120

2221
// end_time is the end of the time interval to search for the trace_id.
2322
//
2423
// This field is optional.
25-
google.protobuf.Timestamp end_time = 3 [(gogoproto.stdtime) = true];
24+
google.protobuf.Timestamp end_time = 3;
2625
}
2726

2827
// GetTracesRequest represents a request to retrieve multiple traces.
@@ -49,13 +48,13 @@ message GetOperationsRequest {
4948
// spans generated in a particular context.
5049
//
5150
// This field is optional.
52-
opentelemetry.proto.trace.v1.Span.SpanKind span_kind = 2;
51+
string span_kind = 2;
5352
}
5453

5554
// Operation contains information about an operation for a given service.
5655
message Operation {
5756
string name = 1;
58-
opentelemetry.proto.trace.v1.Span.SpanKind span_kind = 2;
57+
string span_kind = 2;
5958
}
6059

6160
// GetOperationsResponse represents the response for GetOperationsRequest.
@@ -98,22 +97,10 @@ message TraceQueryParameters {
9897
string service_name = 1;
9998
string operation_name = 2;
10099
repeated KeyValue attributes = 3;
101-
google.protobuf.Timestamp start_time_min = 4 [
102-
(gogoproto.stdtime) = true,
103-
(gogoproto.nullable) = false
104-
];
105-
google.protobuf.Timestamp start_time_max = 5 [
106-
(gogoproto.stdtime) = true,
107-
(gogoproto.nullable) = false
108-
];
109-
google.protobuf.Duration duration_min = 6 [
110-
(gogoproto.stdduration) = true,
111-
(gogoproto.nullable) = false
112-
];
113-
google.protobuf.Duration duration_max = 7 [
114-
(gogoproto.stdduration) = true,
115-
(gogoproto.nullable) = false
116-
];
100+
google.protobuf.Timestamp start_time_min = 4;
101+
google.protobuf.Timestamp start_time_max = 5;
102+
google.protobuf.Duration duration_min = 6;
103+
google.protobuf.Duration duration_max = 7;
117104
int32 search_depth = 8;
118105
}
119106

@@ -133,14 +120,8 @@ message FindTracesRequest {
133120
// It is meant as a rough boundary and may not be populated in all cases.
134121
message FoundTraceID {
135122
bytes trace_id = 1;
136-
google.protobuf.Timestamp start = 2 [
137-
(gogoproto.stdtime) = true,
138-
(gogoproto.nullable) = false
139-
];
140-
google.protobuf.Timestamp end = 3 [
141-
(gogoproto.stdtime) = true,
142-
(gogoproto.nullable) = false
143-
];
123+
google.protobuf.Timestamp start = 2;
124+
google.protobuf.Timestamp end = 3;
144125
}
145126

146127
// FindTraceIDsResponse represents the response for FindTracesRequest.
File renamed without changes.

proto-gen/storage/v2/dependency_storage.pb.go

Lines changed: 27 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)