Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apis/tilebox/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ message Pagination {
// This is the id of the last entry returned in the previous page as the next parameter in each paginated query.
tilebox.v1.ID starting_after = 2 [features.field_presence = EXPLICIT];
}

// SortDirection specifies the direction in which to sort log entries when querying logs. It can be used in combination
// with the cursor field in TelemetryPagination to paginate through log entries in either ascending or descending order.
enum SortDirection {
SORT_DIRECTION_UNSPECIFIED = 0;
// Sort in ascending order (oldest entries first).
SORT_DIRECTION_ASCENDING = 1;
// Sort in descending order (newest entries first).
SORT_DIRECTION_DESCENDING = 2;
}
2 changes: 2 additions & 0 deletions apis/workflows/v1/job.proto
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ message QueryJobsRequest {
QueryFilters filters = 1;
// The pagination parameters for this request.
tilebox.v1.Pagination page = 2 [features.field_presence = EXPLICIT];
// The sort order for jobs (by submission date). Defaults to descending order (newest jobs first).
tilebox.v1.SortDirection sort_direction = 3;
}

// A list of jobs.
Expand Down
16 changes: 3 additions & 13 deletions apis/workflows/v1/telemetry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ import "opentelemetry/proto/trace/v1/trace.proto";
import "tilebox/v1/id.proto";
import "tilebox/v1/query.proto";

// SortDirection specifies the direction in which to sort log entries when querying logs. It can be used in combination
// with the cursor field in TelemetryPagination to paginate through log entries in either ascending or descending order.
enum SortDirection {
SORT_DIRECTION_UNSPECIFIED = 0;
// Sort in ascending order (oldest entries first).
SORT_DIRECTION_ASCENDING = 1;
// Sort in descending order (newest entries first).
SORT_DIRECTION_DESCENDING = 2;
}

// QueryJobLogsRequest is the request message for querying logs of a specific job, in ascending or descending order,
// with pagination support.
message QueryJobLogsRequest {
Expand All @@ -27,7 +17,7 @@ message QueryJobLogsRequest {
// The pagination parameters for this request.
tilebox.v1.Pagination page = 2 [features.field_presence = EXPLICIT];
// The direction in which to sort log entries. If not specified, defaults to ascending order (oldest entries first).
SortDirection sort_direction = 3;
tilebox.v1.SortDirection sort_direction = 3;
}

// QueryLogsInIntervalRequest is the request message for querying logs in a specific time interval.
Expand All @@ -38,7 +28,7 @@ message QueryLogsInIntervalRequest {
// The pagination parameters for this request.
tilebox.v1.Pagination page = 2 [features.field_presence = EXPLICIT];
// The direction in which to sort log entries. If not specified, defaults to descending order (newest entries first).
SortDirection sort_direction = 3;
tilebox.v1.SortDirection sort_direction = 3;
}

// PaginatedLogsData is the response message for paginated log queries. It's a message compatible with LogsData,
Expand All @@ -58,7 +48,7 @@ message QueryJobSpansRequest {
// The pagination parameters for this request.
tilebox.v1.Pagination page = 2 [features.field_presence = EXPLICIT];
// The direction in which to sort log entries. If not specified, defaults to ascending order (oldest entries first).
SortDirection sort_direction = 3;
tilebox.v1.SortDirection sort_direction = 3;
}

// PaginatedSpansData is the response message for paginated log queries. It's a message compatible with LogsData,
Expand Down