Skip to content

Commit 6d43e54

Browse files
authored
docs(metrics): list known metric names in --metric help text (DX-5700) (#32)
The --metric flag help was uneven: 'qn endpoint metrics' showed only two example names, and 'qn metrics account' / 'qn metrics endpoint' gave no examples at all. List the known metric names (method_calls_over_time, metered_endpoint_data_over_time, metered_endpoint_credits_over_time, credits_over_time) on all three, keeping response_status_breakdown on the endpoint-scoped commands. Help text only; no validation change. 223 tests pass.
1 parent a956f5c commit 6d43e54

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/commands/endpoint/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ pub struct MetricsArgs {
200200
/// Endpoint id.
201201
#[arg(value_name = "ENDPOINT_ID")]
202202
pub id: String,
203-
/// Metric name (e.g. `method_calls_over_time`, `response_status_breakdown`).
203+
/// Metric name (e.g. `method_calls_over_time`, `metered_endpoint_data_over_time`,
204+
/// `metered_endpoint_credits_over_time`, `credits_over_time`, `response_status_breakdown`).
204205
#[arg(long)]
205206
pub metric: String,
206207
/// Period (`hour`, `day`, `week`, `month`).

src/commands/metrics.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ pub struct AccountArgs {
2828
/// Period.
2929
#[arg(long, value_parser = ["hour", "day", "week", "month"])]
3030
pub period: String,
31-
/// Metric name.
31+
/// Metric name (e.g. `method_calls_over_time`, `metered_endpoint_data_over_time`,
32+
/// `metered_endpoint_credits_over_time`, `credits_over_time`).
3233
#[arg(long)]
3334
pub metric: String,
3435
/// Percentile (for latency metrics).
@@ -44,7 +45,8 @@ pub struct EndpointArgs {
4445
/// Period.
4546
#[arg(long, value_parser = ["hour", "day", "week", "month"])]
4647
pub period: String,
47-
/// Metric name.
48+
/// Metric name (e.g. `method_calls_over_time`, `metered_endpoint_data_over_time`,
49+
/// `metered_endpoint_credits_over_time`, `credits_over_time`, `response_status_breakdown`).
4850
#[arg(long)]
4951
pub metric: String,
5052
}

0 commit comments

Comments
 (0)