fetch single metric
This commit is contained in:
parent
a4e9a23d74
commit
db3c27c7f2
13 changed files with 137 additions and 19 deletions
|
|
@ -172,7 +172,7 @@ service LightningPub {
|
|||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc GetUsageMetrics(structs.Empty) returns (structs.UsageMetrics) {
|
||||
rpc GetUsageMetrics(structs.UsageMetricReq) returns (structs.UsageMetrics) {
|
||||
option (auth_type) = "Metrics";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/reports/usage";
|
||||
|
|
|
|||
|
|
@ -33,6 +33,17 @@ message ErrorStats {
|
|||
ErrorStat past1m = 5;
|
||||
}
|
||||
|
||||
message MetricsFile {
|
||||
string app_id = 1;
|
||||
string metrics_name = 2;
|
||||
int64 page = 3;
|
||||
}
|
||||
|
||||
message UsageMetricReq {
|
||||
optional int64 limit = 1;
|
||||
optional MetricsFile metrics_file = 2;
|
||||
}
|
||||
|
||||
message UsageMetric {
|
||||
int64 processed_at_ms = 1;
|
||||
int64 parsed_in_nano = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue