2016-01-06 21:24:54 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2019-08-06 18:53:14 +02:00
|
|
|
service Debug {
|
2019-11-26 17:39:55 +02:00
|
|
|
rpc Health(HealthRequest) returns (HealthResponse) {};
|
|
|
|
rpc Stats(StatsRequest) returns (StatsResponse) {};
|
2019-11-27 19:31:35 +02:00
|
|
|
rpc Logs(LogRequest) returns (stream Log) {};
|
2019-08-06 18:53:14 +02:00
|
|
|
}
|
2016-01-06 21:24:54 +02:00
|
|
|
|
2019-11-26 17:39:55 +02:00
|
|
|
message HealthRequest {}
|
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-11-26 17:39:55 +02:00
|
|
|
message StatsRequest {}
|
2016-05-28 23:30:47 +02:00
|
|
|
|
|
|
|
message StatsResponse {
|
|
|
|
// unix timestamp
|
|
|
|
uint64 started = 1;
|
|
|
|
// in seconds
|
|
|
|
uint64 uptime = 2;
|
|
|
|
// in bytes
|
|
|
|
uint64 memory = 3;
|
|
|
|
// num threads
|
|
|
|
uint64 threads = 4;
|
|
|
|
// total gc in nanoseconds
|
|
|
|
uint64 gc = 5;
|
|
|
|
}
|
2019-11-26 17:39:55 +02:00
|
|
|
|
|
|
|
// LogRequest queries service for logs
|
|
|
|
message LogRequest {
|
|
|
|
// count is the count of events
|
|
|
|
uint64 count = 1;
|
|
|
|
// relative time in seconds
|
|
|
|
// before the current time
|
|
|
|
// from which to show logs
|
|
|
|
uint64 since = 2;
|
|
|
|
// stream logs continuously
|
|
|
|
bool stream = 3;
|
|
|
|
}
|
|
|
|
|
2019-11-27 19:31:35 +02:00
|
|
|
// Log is service log record
|
|
|
|
message Log {
|
|
|
|
// timestamp of log event
|
|
|
|
int64 timestamp = 1;
|
|
|
|
// log value
|
|
|
|
string value = 2;
|
|
|
|
// metadata
|
|
|
|
map<string,string> metadata = 3;
|
2019-11-26 17:39:55 +02:00
|
|
|
}
|