Document the meter-analyzer-config catalog in admin runtime-rule / admin dsl-debug - #233
Merged
Merged
Conversation
…dsl-debug apache/skywalking#13969 brings native meter (MeterReportService) rules to parity with otel-rules: they now load through the shared Rules pipeline, so a meter rule can be hot-added, overridden or inactivated at runtime and attached to a MAL DSL debug session. On the wire that is purely additive — one more value in the shared `Catalog` enum (`METER_ANALYZER_CONFIG`). No new endpoints, no new request or response fields. swctl therefore needs no functional change: `--catalog` is passed through verbatim, and pkg/admin/runtimerule only ever calls the canonical `/runtime/rule/...` routes, never the per-catalog shortcut routes that `meter-analyzer-config` deliberately lacks. The OAP-side e2e added in that commit already drives the whole flow (bundled / add / edit / dsl-debug / inactivate) through `swctl admin ...` against this catalog. What was stale was discoverability, so: - add `meter-analyzer-config` to the `--catalog` flag help of `admin runtime-rule` and `admin dsl-debug session start`, and to the `admin runtime-rule` catalog list. - drop the two unreferenced `Catalogs` vars in pkg/admin/{runtimerule,dsldebug}. Nothing read them — they were a second copy of the catalog list, free to drift out of sync with OAP's enum, and this change is exactly the drift they would have caused. The rendered help text is now the single place the list lives; widening it is not a client-side allow-list, so a newer OAP catalog keeps working without a CLI release. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Documents OAP’s new meter-analyzer-config catalog without changing CLI behavior.
Changes:
- Updates runtime-rule and DSL-debug help text.
- Removes unused catalog-list variables.
- Adds a 0.15.0 changelog entry.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pkg/admin/runtimerule/runtimerule.go |
Removes unused catalog list. |
pkg/admin/dsldebug/dsldebug.go |
Removes unused catalog list. |
internal/commands/admin/runtimerule/runtimerule.go |
Documents the meter catalog. |
internal/commands/admin/dsldebug/dsldebug.go |
Documents meter DSL debugging. |
CHANGES.md |
Records the documentation update. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mrproliu
approved these changes
Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
apache/skywalking#13969 brings the
meter-analyzer-configcatalog (nativeMeterReportServicerules) to parity withotel-rules: those rules now load through the sharedRules/RuleSetMergerpipeline, so a meter rule can be hot-added, structurally edited, or inactivated at runtime, and attached to a MAL DSL debug session — without restarting OAP.Does swctl need a functional change? No.
On the wire that OAP change is purely additive — one more value in the shared
Catalogenum:No new endpoints, no new request/response fields, no changed payload shapes. And swctl already passes it through:
--catalogreaches the server verbatim.pkg/admin/runtimeruleonly ever calls the canonical/runtime/rule/{list,bundled,addOrUpdate,inactivate,delete,dump}routes; it never maps a catalog onto the/runtime/mal/otel-style shortcuts. That matters, becausemeter-analyzer-configis one of the two catalogs (withtelegraf-rules) that deliberately has no shortcut route.The e2e added in that same OAP PR (
test/e2e-v2/cases/runtime-rule/meter/meter-runtime-rule-flow.sh) is the proof: it setsCATALOG="meter-analyzer-config"and drives all five phases — bundled visibility, hot add, structural edit with converter replacement, DSL debug session, inactivate — entirely throughswctl admin runtime-rule …andswctl admin dsl-debug session …against an unmodified CLI.What this PR does
What was stale is discoverability —
--helpstill advertised only four catalogs.meter-analyzer-configto the--catalogflag help ofadmin runtime-ruleandadmin dsl-debug session start, and to theadmin runtime-rulecatalog list.Catalogsvars inpkg/admin/{runtimerule,dsldebug}. Nothing read them — they were a second copy of the catalog list, free to drift out of sync with OAP's enum, and this change is exactly the drift they would have caused. The rendered help text is now the single place the list lives; keeping it out of a client-side allow-list means a newer OAP catalog keeps working without a CLI release.CHANGES.mdentry under 0.15.0.Verification
go build ./...,go vet, andgo test ./pkg/admin/... ./internal/commands/admin/...all pass.make lintfails identically before and after (40 pre-existinglllviolations in untouched files); this change adds none.🤖 Generated with Claude Code