Skip to content

Commit

Permalink
[refactor] Return start and end timestamps from FindTraceIDs in v2 re…
Browse files Browse the repository at this point in the history
…mote storage api (#6772)

## Which problem is this PR solving?
- Towards #6629

## Description of the changes
- This is a copy of #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]>
  • Loading branch information
mahadzaryab1 authored Feb 24, 2025
1 parent b207889 commit 300cc7c
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 56 deletions.
24 changes: 22 additions & 2 deletions internal/storage/v2/grpc/trace_storage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ message GetOperationsResponse {
repeated Operation operations = 1;
}

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


// FoundTraceID is a wrapper around trace ID returned from FindTraceIDs
// with an optional time range that may be used in GetTraces calls.
//
// The time range is provided as an optimization hint for some storage backends
// that can perform more efficient queries when they know the approximate time range.
// The value should not be used for precise time-based filtering or assumptions.
// It is meant as a rough boundary and may not be populated in all cases.
message FoundTraceID {
bytes trace_id = 1;
google.protobuf.Timestamp start = 2 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
google.protobuf.Timestamp end = 3 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
}

// FindTraceIDsResponse represents the response for FindTracesRequest.
message FindTraceIDsResponse {
repeated bytes trace_ids = 1;
repeated FoundTraceID trace_ids = 1;
}

// TraceReader is a service that allows reading traces from storage.
Expand Down
173 changes: 119 additions & 54 deletions proto-gen/storage/v2/trace_storage.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 300cc7c

Please sign in to comment.