Runtime logs (#1447)

* Runtime logs

* Slightly broken

* Pushing for diff

* Log trailing works locally

* LogsOptions

* Comments and streamcount support for local logs

* Adding kubernetes logs

* Fixing k8s logs

* K8s fixes

* StreamCount is now nuked

* PR comments

* PR comments again

* Fix typo
This commit is contained in:
Janos Dobronszki
2020-04-01 15:40:15 +02:00
committed by GitHub
parent 20c95d94cd
commit bb51b8203e
11 changed files with 744 additions and 299 deletions

View File

@@ -8,6 +8,7 @@ service Runtime {
rpc Delete(DeleteRequest) returns (DeleteResponse) {};
rpc Update(UpdateRequest) returns (UpdateResponse) {};
rpc List(ListRequest) returns (ListResponse) {};
rpc Logs(LogsRequest) returns (stream LogRecord) {};
}
message Service {
@@ -84,3 +85,26 @@ message ListRequest {}
message ListResponse {
repeated Service services = 1;
}
message LogsRequest{
// service to request logs for
string service = 1;
// stream records continuously
bool stream = 2;
// count of records to request
int64 count = 3;
// relative time in seconds
// before the current time
// from which to show logs
int64 since = 4;
}
message LogRecord {
// timestamp of log record
int64 timestamp = 1;
// record metadata
map<string,string> metadata = 2;
// message
string message = 3;
}