app metrics
This commit is contained in:
parent
f0dd9a08ac
commit
7e1157caa4
16 changed files with 3056 additions and 2462 deletions
|
|
@ -97,10 +97,16 @@ service LightningPub {
|
|||
option (http_route) = "/api/admin/app/auth";
|
||||
}
|
||||
|
||||
rpc GetMetrics(structs.Empty) returns (structs.UsageMetrics) {
|
||||
rpc GetUsageMetrics(structs.Empty) returns (structs.UsageMetrics) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/metrics";
|
||||
option (http_route) = "/api/admin/metrics/usage";
|
||||
}
|
||||
|
||||
rpc GetAppsMetrics(structs.AppsMetricsRequest) returns (structs.AppsMetrics) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/metrics/apps";
|
||||
}
|
||||
// </Admin>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,14 +22,44 @@ message UsageMetric {
|
|||
bool batch = 7;
|
||||
bool nostr = 8;
|
||||
int64 batch_size = 9;
|
||||
bool success = 10;
|
||||
string app_id = 11;
|
||||
}
|
||||
|
||||
message UsageMetrics {
|
||||
repeated UsageMetric metrics = 1;
|
||||
}
|
||||
|
||||
message AppsMetricsRequest {
|
||||
optional int64 from_unix = 1;
|
||||
optional int64 to_unix = 2;
|
||||
optional int64 big_user_sats = 3;
|
||||
optional int64 huge_user_sats = 4;
|
||||
optional bool include_operations = 5;
|
||||
}
|
||||
|
||||
message AppMetrics {
|
||||
string app_name = 1;
|
||||
string app_id = 2;
|
||||
string app_npub = 3;
|
||||
int64 app_balance = 4;
|
||||
|
||||
int64 total_received = 5;
|
||||
int64 total_spent = 6;
|
||||
int64 total_available = 7;
|
||||
|
||||
int64 total_users = 8;
|
||||
int64 total_big_users = 9;
|
||||
int64 total_huge_users = 10;
|
||||
|
||||
int64 unpaid_invoices = 11;
|
||||
int64 unpaid_addresses = 12;
|
||||
|
||||
repeated UserOperation operations = 100;
|
||||
}
|
||||
|
||||
message AppsMetrics {
|
||||
repeated AppMetrics apps = 1;
|
||||
}
|
||||
|
||||
message LndGetInfoRequest {
|
||||
int64 nodeId = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue