Add admin inspect values to read foreign metric values#232
Merged
Conversation
The new sub-command POSTs to the OAP admin API `POST /inspect/values` to
evaluate an MQE expression over metric(s) the target OAP does not define
locally (foreign metrics), supplying each metric's {valueColumn, valueType}.
The entity scope is inferred from which name flag is set (--service-name /
--service-instance-name / --endpoint-name). Returns the native MQE result.
wankai123
approved these changes
Jun 24, 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.
Add the
admin inspect valuessub-commandAdds
swctl admin inspect values, which reads the values of metric(s) thetarget OAP does not define locally ("foreign" metrics) by supplying each
metric's
{valueColumn, valueType}metadata. It POSTs to the new OAP admin APIPOST /inspect/values, which runs the real MQE engine over the caller-suppliedmetadata and returns the native MQE
ExpressionResult(the same shape the UIrenders for catalog metrics).
Usage:
(
--service-name→ Service,--service-instance-name→ ServiceInstance,--endpoint-name→ Endpoint).--foreign-metric name,valueColumn,valueTypeis repeatable — supply one perforeign 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/valuesadmin API (Apache SkyWalking 11.0.0).CHANGES.mdupdated; command help text included./inspect/values; lint + unit tests pass. (The command's own e2e lands with the OAP API.)🤖 Generated with Claude Code