Add --value-column / --value-type to admin inspect entities for foreign-metric inspect#230
Merged
Merged
Conversation
…gn-metric inspect SkyWalking OAP's /inspect/entities now accepts a metric persisted by another OAP (one this node does not define locally) when the caller supplies the metric's value column + type. Expose those as --value-column / --value-type on `swctl admin inspect entities`; both are passed through as query params and are required only when the metric is unknown to the target OAP's local registry.
wankai123
previously approved these changes
Jun 23, 2026
Adding ValueColumn/ValueType pushed EntitiesOptions to 104 bytes, over gocritic's hugeParam 80-byte threshold; pass it by pointer.
hanahmily
approved these changes
Jun 23, 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.
What
Adds two flags to
swctl admin inspect entities:--value-column— the metric's value column (e.g.value,value_,double_value)--value-type— value data type (LONG/INT/DOUBLE/LABELED)Both are passed through as query params to
GET /inspect/entitiesand are required only when the metric is not defined on the target OAP — i.e. a metric persisted by another OAP that this node never loaded the OAL/MAL/runtime-rule for.Why
SkyWalking OAP's inspect API was extended so
/inspect/entitiescan inspect a metric persisted by any OAP, even one the queried node does not define locally. Since the value column/type cannot be recovered from the metric name in that case, the caller supplies them. This change letsswctldrive that foreign-metric path (otherwise the new capability is only reachable via raw curl).For a locally-defined metric the flags are ignored, so existing usage is unchanged.
Example