2016-01-06 21:24:54 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2019-08-06 18:53:14 +02:00
|
|
|
service Debug {
|
2019-12-01 15:15:10 +02:00
|
|
|
rpc Health(HealthRequest) returns (HealthResponse) {};
|
|
|
|
rpc Stats(StatsRequest) returns (StatsResponse) {};
|
2019-12-05 01:58:29 +02:00
|
|
|
rpc Log(LogRequest) returns (stream Record) {};
|
2019-08-06 18:53:14 +02:00
|
|
|
}
|
2016-01-06 21:24:54 +02:00
|
|
|
|
2019-12-04 14:02:44 +02:00
|
|
|
message HealthRequest {
|
|
|
|
// optional service name
|
|
|
|
string service = 1;
|
|
|
|
}
|
2016-01-06 21:24:54 +02:00
|
|
|
|
|
|
|
message HealthResponse {
|
2016-05-28 23:30:47 +02:00
|
|
|
// default: ok
|
2016-01-06 21:24:54 +02:00
|
|
|
string status = 1;
|
|
|
|
}
|
2016-05-28 23:30:47 +02:00
|
|
|
|
2019-12-04 14:02:44 +02:00
|
|
|
message StatsRequest {
|
|
|
|
// optional service name
|
|
|
|
string service = 1;
|
|
|
|
}
|
2016-05-28 23:30:47 +02:00
|
|
|
|
|
|
|
message StatsResponse {
|
2019-12-05 01:51:07 +02:00
|
|
|
// timestamp of recording
|
|
|
|
uint64 timestamp = 1;
|
2016-05-28 23:30:47 +02:00
|
|
|
// unix timestamp
|
2019-12-05 01:51:07 +02:00
|
|
|
uint64 started = 2;
|
2016-05-28 23:30:47 +02:00
|
|
|
// in seconds
|
2019-12-05 01:51:07 +02:00
|
|
|
uint64 uptime = 3;
|
2016-05-28 23:30:47 +02:00
|
|
|
// in bytes
|
2019-12-05 01:51:07 +02:00
|
|
|
uint64 memory = 4;
|
2016-05-28 23:30:47 +02:00
|
|
|
// num threads
|
2019-12-05 01:51:07 +02:00
|
|
|
uint64 threads = 5;
|
2016-05-28 23:30:47 +02:00
|
|
|
// total gc in nanoseconds
|
2019-12-05 01:51:07 +02:00
|
|
|
uint64 gc = 6;
|
2016-05-28 23:30:47 +02:00
|
|
|
}
|
2019-11-26 17:39:55 +02:00
|
|
|
|
2019-12-01 15:15:10 +02:00
|
|
|
// LogRequest requests service logs
|
2019-11-26 17:39:55 +02:00
|
|
|
message LogRequest {
|
2019-12-04 14:02:44 +02:00
|
|
|
// service to request logs for
|
|
|
|
string service = 1;
|
2019-12-04 14:28:16 +02:00
|
|
|
// 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;
|
2019-11-26 17:39:55 +02:00
|
|
|
}
|
|
|
|
|
2019-12-01 15:15:10 +02:00
|
|
|
// Record is service log record
|
|
|
|
message Record {
|
|
|
|
// timestamp of log record
|
2019-11-27 19:31:35 +02:00
|
|
|
int64 timestamp = 1;
|
2019-12-01 15:15:10 +02:00
|
|
|
// record value
|
2019-11-27 19:31:35 +02:00
|
|
|
string value = 2;
|
2019-12-01 15:15:10 +02:00
|
|
|
// record metadata
|
2019-11-27 19:31:35 +02:00
|
|
|
map<string,string> metadata = 3;
|
2019-11-26 17:39:55 +02:00
|
|
|
}
|