primus.cli.metrics.commands module

CLI commands for metrics aggregation.

Commands: - show: Display aggregated metrics for a time range - verify: Compare computed counts vs stored values (read-only) - update: Recompute and update aggregated metrics

primus.cli.metrics.commands.get_account_id_from_env(client: PrimusDashboardClient) → str

Get account ID from PRIMUS_ACCOUNT_KEY environment variable.

Args:

client: The API client

Returns:

Account ID

Raises:

ValueError: If PRIMUS_ACCOUNT_KEY is not set or account not found

primus.cli.metrics.commands.is_feedback_record_type(record_type: str) → bool
primus.cli.metrics.commands.metric_count_lookup_key(metric_or_bucket: Any) → tuple