Skip to content

Commit 9b98342

Browse files
mahadzaryab1amol-verma-allen
authored andcommitted
[refactor] Return start and end timestamps from FindTraceIDs in v2 remote storage api (jaegertracing#6772)
## Which problem is this PR solving? - Towards jaegertracing#6629 ## Description of the changes - This is a copy of jaegertracing#6770 but for the v2 remote storage API ## 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]> Signed-off-by: amol-verma-allen <[email protected]>
1 parent 9ed89a3 commit 9b98342

File tree

2 files changed

+141
-56
lines changed

2 files changed

+141
-56
lines changed

internal/storage/v2/grpc/trace_storage.proto

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ message GetOperationsResponse {
6464
repeated Operation operations = 1;
6565
}
6666

67-
// TraceQueryParameters contains query paramters to find traces. For a detailed
67+
// TraceQueryParameters contains query parameters to find traces. For a detailed
6868
// definition of each field in this message, refer to `TraceQueryParameters` in `jaeger.api_v3`
6969
// (https://github.com/jaegertracing/jaeger-idl/blob/main/proto/api_v3/query_service.proto).
7070
message TraceQueryParameters {
@@ -97,9 +97,29 @@ message FindTracesRequest {
9797
TraceQueryParameters query = 1;
9898
}
9999

100+
101+
// FoundTraceID is a wrapper around trace ID returned from FindTraceIDs
102+
// with an optional time range that may be used in GetTraces calls.
103+
//
104+
// The time range is provided as an optimization hint for some storage backends
105+
// that can perform more efficient queries when they know the approximate time range.
106+
// The value should not be used for precise time-based filtering or assumptions.
107+
// It is meant as a rough boundary and may not be populated in all cases.
108+
message FoundTraceID {
109+
bytes trace_id = 1;
110+
google.protobuf.Timestamp start = 2 [
111+
(gogoproto.stdtime) = true,
112+
(gogoproto.nullable) = false
113+
];
114+
google.protobuf.Timestamp end = 3 [
115+
(gogoproto.stdtime) = true,
116+
(gogoproto.nullable) = false
117+
];
118+
}
119+
100120
// FindTraceIDsResponse represents the response for FindTracesRequest.
101121
message FindTraceIDsResponse {
102-
repeated bytes trace_ids = 1;
122+
repeated FoundTraceID trace_ids = 1;
103123
}
104124

105125
// TraceReader is a service that allows reading traces from storage.

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

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

0 commit comments

Comments
 (0)