error rates

This commit is contained in:
boufni95 2025-01-09 17:42:54 +00:00
parent 4aeb565596
commit 16d4198364
13 changed files with 323 additions and 9 deletions

View file

@ -178,6 +178,12 @@ service LightningPub {
option (http_route) = "/api/reports/usage";
option (nostr) = true;
}
rpc GetErrorStats(structs.Empty) returns (structs.ErrorStats) {
option (auth_type) = "Metrics";
option (http_method) = "post";
option (http_route) = "/api/reports/errors";
option (nostr) = true;
}
rpc GetAppsMetrics(structs.AppsMetricsRequest) returns (structs.AppsMetrics) {
option (auth_type) = "Metrics";

View file

@ -19,6 +19,20 @@ message UserHealthState {
string downtime_reason = 1;
}
message ErrorStat {
int64 from_unix = 1;
int64 total = 2;
int64 errors = 3;
}
message ErrorStats {
ErrorStat past24h = 1;
ErrorStat past6h = 2;
ErrorStat past1h = 3;
ErrorStat past10m = 4;
ErrorStat past1m = 5;
}
message UsageMetric {
int64 processed_at_ms = 1;
int64 parsed_in_nano = 2;