Skip to content

feat(serverless): add space metrics inference command - #267

Merged
Robert-Stam merged 2 commits into
mainfrom
feat/serverless-space-inference-metrics
Nov 25, 2026
Merged

Robert-Stam merged 2 commits into
mainfrom
feat/serverless-space-inference-metrics

Conversation

@Robert-Stam

Copy link
Copy Markdown
Contributor

Summary

Adds qcloud serverless space metrics inference <space-id>. It uses MonitoringService.GetSpaceInferenceMetrics from the public API (already in v0.234.0). Until now, the CLI did not call this RPC.

Flags

Flag Request field Notes
--since / --until since / until Same parser as metrics usage. The default is the last 7 days, the same as the server default. With only --until, the 7 days before it.
--interval interval day, week or month. If not set, the field is not sent, so the server default (day) applies.
--model inference_model_id
--collection / --collection-contains collection_filter oneof Shared helper, mutually exclusive
--page-size / --page-token pagination All pages are fetched by default, as in the other metrics commands

Output

Buckets: per day, 2026-10-01 00:00:00 UTC to 2026-10-03 00:00:00 UTC
Total Tokens: 8530

COLLECTION   MODEL     TOKENS   PEAK PER DAY
products     model-a   8500     5000
products     model-b   30       20

There is one row per collection and model, with the total tokens over the period and the largest bucket. --json prints the full response, including the individual buckets.

Testing

  • Text output: header, rows, total, bucket period. Rows for collections or models without data show -.
  • JSON output.
  • Request fields, every --interval value, the collection filters, and --until alone covering the 7 days before it.
  • Automatic and manual pagination.
  • Input errors are rejected without calling the API. Backend errors are covered.
  • make lint, make build, make test and make docs pass. The docs are regenerated.

Found as gap G2 in the serverless public API coverage review.

🤖 Generated with Claude Code

Written with Overlord from https://overlord.qdrant.tech/r/1089/t/7445

Adds "qcloud serverless space metrics inference <space-id>", backed by
MonitoringService.GetSpaceInferenceMetrics. It reports the inference tokens
per collection and model, with --since/--until (default: last 7 days, same
as the server), --interval day|week|month, --model, --collection or
--collection-contains, and automatic or manual pagination.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Robert-Stam
Robert-Stam requested a review from a team November 25, 2026 13:50
@Robert-Stam
Robert-Stam requested a review from a team as a code owner November 25, 2026 13:50
@Robert-Stam
Robert-Stam merged commit 0bd8ba7 into main Nov 25, 2026
5 checks passed
@Robert-Stam
Robert-Stam deleted the feat/serverless-space-inference-metrics branch November 25, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants