Skip to content

Add --value-column / --value-type to admin inspect entities for foreign-metric inspect#230

Merged
wu-sheng merged 2 commits into
masterfrom
inspect-foreign-metric-flags
Jun 23, 2026
Merged

Add --value-column / --value-type to admin inspect entities for foreign-metric inspect#230
wu-sheng merged 2 commits into
masterfrom
inspect-foreign-metric-flags

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

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/entities and 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/entities can 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 lets swctl drive 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

swctl admin inspect entities --metric meter_foo --value-column value --value-type LONG \
  --start "2026-06-23 0840" --end "2026-06-23 0900" --step MINUTE

…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.
@wu-sheng wu-sheng added this to the 0.15.0 milestone Jun 23, 2026
@wu-sheng wu-sheng added the enhancement New feature or request label Jun 23, 2026
wankai123
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.
@wu-sheng wu-sheng merged commit c0b5f58 into master Jun 23, 2026
7 checks passed
@wu-sheng wu-sheng deleted the inspect-foreign-metric-flags branch June 23, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants