wu-sheng opened a new pull request, #232:
URL: https://github.com/apache/skywalking-cli/pull/232
### Add the `admin inspect values` sub-command
Adds `swctl admin inspect values`, which reads the **values** of metric(s)
the
target OAP does **not** define locally ("foreign" metrics) by supplying each
metric's `{valueColumn, valueType}` metadata. It POSTs to the new OAP admin
API
`POST /inspect/values`, which runs the real MQE engine over the
caller-supplied
metadata and returns the native MQE `ExpressionResult` (the same shape the UI
renders for catalog metrics).
Usage:
```
swctl --admin-url http://<oap>:17128 admin inspect values \
--expression meter_foo \
--service-name my-svc \
--foreign-metric meter_foo,value,LONG \
--start "-30m" --end "0m" --step MINUTE
```
- The entity scope is inferred from which name flag is set
(`--service-name` → Service, `--service-instance-name` → ServiceInstance,
`--endpoint-name` → Endpoint).
- `--foreign-metric name,valueColumn,valueType` is repeatable — supply one
per
foreign metric referenced by the expression.
This is the value-reading companion to the existing `admin inspect entities`
(which enumerates a foreign metric's entities). It targets the OAP-side
`POST /inspect/values` admin API (Apache SkyWalking 11.0.0).
- [x] If this is non-trivial feature, paste the links/URLs to the design
doc. — N/A (feature implementation; see the OAP PR for the server side).
- [x] Update the documentation to include this new feature. — `CHANGES.md`
updated; command help text included.
- [x] Tests(including UT, IT, E2E) are added to verify the new feature. —
verified end-to-end against a live OAP serving `/inspect/values`; lint + unit
tests pass. (The command's own e2e lands with the OAP API.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]