Bluemage/schemas/proto/logs/v1/logs.proto

55 lines
840 B
Protocol Buffer

syntax = "proto3";
package logs.v1;
service LogService {
rpc Log(LogRequest) returns (LogResponse) {}
rpc Tail(TailRequest) returns (stream TailResponse) {}
}
message LogRequest {
Level level = 1;
string search = 2;
string trace_id = 3;
int64 from = 4;
int64 to = 5;
int64 limit = 6;
}
message LogResponse {
repeated Log logs = 1;
}
message Log {
int64 timestamp = 1;
Level level = 2;
string message = 3;
Origin origin = 4;
string trace_id = 5;
string span_id = 6;
optional bytes details = 7;
optional bytes error = 8;
}
enum Level {
LEVEL_UNSPECIFIED = 0;
LEVEL_DEBUG = 1;
LEVEL_INFO = 2;
LEVEL_WARN = 3;
LEVEL_ERROR = 4;
}
message Origin {
string file = 1;
int64 line = 2;
string function = 3;
}
message TailRequest {
Level level = 1;
}
message TailResponse {
Log log = 1;
}