Skip to content

Commit c3bb068

Browse files
author
Braden Olsen
committed
Introduces TimeRange message for log filtering
Defines a `TimeRange` message to represent a time interval, which allows for more structured and flexible time-based filtering of logs. Replaces the generic string filter in `ListTenantLogsRequest` with the new `TimeRange` message, improving code clarity and maintainability.
1 parent b21fb2b commit c3bb068

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

tcnapi/exile/gate/v2/public.proto

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,14 @@ service GateService {
301301
}
302302
}
303303

304+
// TimeRange represents an inclusive time interval for filtering logs.
305+
message TimeRange {
306+
// Start of the time range (inclusive).
307+
google.protobuf.Timestamp start_time = 1;
308+
// End of the time range (inclusive).
309+
google.protobuf.Timestamp end_time = 2;
310+
}
311+
304312
/**
305313
* Request message for logging operations.
306314
*/
@@ -476,13 +484,11 @@ message StreamJobsResponse {
476484

477485
/**
478486
* Request message for listing tenant logs.
479-
* Contains filter parameters for time range filtering.
487+
* Contains time range parameters for filtering logs.
480488
*/
481489
message ListTenantLogsRequest {
482-
// Optional. Filter for the returned logs.
483-
// Filter syntax follows AIP-160. For example:
484-
// `timestamp >= "2023-01-01T00:00:00Z" AND timestamp <= "2023-01-31T23:59:59Z"`
485-
string filter = 1;
490+
// Optional time range for filtering logs
491+
TimeRange time_range = 1;
486492
}
487493
}
488494

@@ -830,11 +836,6 @@ message SubmitJobResultsRequest {
830836
TimeRange time_range = 3; // Time range for the logs
831837
map<string, LogLevel> log_levels = 4; // Log levels for different components
832838

833-
message TimeRange {
834-
google.protobuf.Timestamp start_time = 1; // Start time
835-
google.protobuf.Timestamp end_time = 2; // End time
836-
}
837-
838839
enum LogLevel {
839840
DEBUG = 0;
840841
INFO = 1;

0 commit comments

Comments
 (0)