Add envio metrics runtime subcommand#1281
Conversation
Lets `envio metrics --runtime` fetch the indexer's /metrics/runtime endpoint instead of the default /metrics. https://claude.ai/code/session_01FruGiMDrPPWC2wL3KjxFb4
`envio metrics runtime` fetches the indexer's /metrics/runtime endpoint; `envio metrics` still fetches /metrics. https://claude.ai/code/session_01FruGiMDrPPWC2wL3KjxFb4
📝 WalkthroughWalkthroughThis PR extends the ChangesRuntime Metrics Subcommand
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/cli/CommandLineHelp.md`:
- Around line 383-386: The markdown has a heading level jump: replace the
"###### **Subcommands:**" heading with a heading level that matches the
surrounding section hierarchy (e.g., change to "## Subcommands:" or the
appropriate level used nearby) so it no longer jumps from h2 to h6; update the
"Subcommands" heading that contains the `runtime` bullet (the runtime metrics
list item) to the corrected heading level to satisfy markdownlint MD001.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 008bc790-a38a-4da2-ac18-da83686c814a
📒 Files selected for processing (4)
packages/cli/CommandLineHelp.mdpackages/cli/src/cli_args/clap_definitions.rspackages/cli/src/executor/metrics.rspackages/cli/src/executor/mod.rs
| ###### **Subcommands:** | ||
|
|
||
| * `runtime` — Fetch runtime metrics from the running indexer's /metrics/runtime endpoint | ||
|
|
There was a problem hiding this comment.
Fix markdown heading-level jump in the new metrics subsection.
Line 383 introduces a heading level jump (h2 → h6), which triggers markdownlint MD001 in this diff.
Suggested change
-###### **Subcommands:**
+**Subcommands:**📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ###### **Subcommands:** | |
| * `runtime` — Fetch runtime metrics from the running indexer's /metrics/runtime endpoint | |
| **Subcommands:** | |
| * `runtime` — Fetch runtime metrics from the running indexer's /metrics/runtime endpoint | |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 383-383: Heading levels should only increment by one level at a time
Expected: h3; Actual: h6
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/cli/CommandLineHelp.md` around lines 383 - 386, The markdown has a
heading level jump: replace the "###### **Subcommands:**" heading with a heading
level that matches the surrounding section hierarchy (e.g., change to "##
Subcommands:" or the appropriate level used nearby) so it no longer jumps from
h2 to h6; update the "Subcommands" heading that contains the `runtime` bullet
(the runtime metrics list item) to the corrected heading level to satisfy
markdownlint MD001.
Summary
Adds a new
envio metrics runtimesubcommand to fetch runtime-specific metrics from the indexer's/metrics/runtimeendpoint, while maintaining backward compatibility with the existingenvio metricscommand that fetches from/metrics.Changes
Metricscommand from a simple unit variant toMetrics(MetricsArgs)that accepts an optional subcommandMetricsSubcommandenum withRuntimevariant to support the newruntimesubcommandrun()function to accept aruntimeboolean parameter that determines which endpoint to query (/metrics/runtimevs/metrics)CommandLineHelp.mdto reflect the new subcommand structure and usageImplementation Details
runtimeflag is determined by checking if the subcommand matchesMetricsSubcommand::Runtimeenvio metricswithout a subcommand still works and queries the default/metricsendpointhttps://claude.ai/code/session_01FruGiMDrPPWC2wL3KjxFb4
Summary by CodeRabbit
New Features
envio metrics runtimesubcommand to retrieve and display runtime-specific metrics from a dedicated endpoint.Documentation
envio metrics runtimesubcommand and its usage.