Add POST /inspect/values admin API to read foreign metric values#13927
Merged
Conversation
A new admin-only POST /inspect/values reads the VALUES of a metric this OAP does not
define locally (persisted by another OAP), by running the real MQE engine over
caller-supplied {valueColumn, valueType} — the value-reading companion to the merged
GET /inspect/entities foreign path (#13926).
A request-scoped InspectQueryContext ThreadLocal makes the foreign metric look
registered to every read path (provide-if-absent — the local catalog always wins):
ValueColumnMetadata resolves its value column / type / scope, and the storage location
registries resolve where it lives — MetadataRegistry synthesizes a BanyanDB measure
schema, IndexController resolves the ES metrics-all index, TableHelper probes the JDBC
function tables. The storage read paths need no per-DAO special-casing; the response is
the native MQE ExpressionResult. Verified end-to-end across banyandb/es/postgresql.
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.
Adds an admin-only
POST /inspect/valuesthat reads the values of a metric this OAP does not define locally (a "foreign" metric persisted by another OAP), by running the real MQE engine over caller-supplied{valueColumn, valueType}. The value-reading companion to the mergedGET /inspect/entitiesforeign path (#13926).A single request-scoped
InspectQueryContextThreadLocal makes the foreign metric look registered to every read path (provide-if-absent — the local catalog always wins):ValueColumnMetadataresolves its value column / type / scope, and the storage location registries resolve where it lives —MetadataRegistrysynthesizes a BanyanDB measure schema,IndexControllerresolves the ESmetrics-allindex,TableHelperprobes the JDBC function tables. The storage read paths need no per-DAO special-casing; the response is the native MQEExpressionResult. Admin-only (a forced read this OAP cannot validate); not mirrored onto the public REST / GraphQL surface. The entity's scope-required fields are validated in the handler; a malformed entity is a400.Verified end-to-end: OAP-B reads a foreign metric's value (
42) across BanyanDB, Elasticsearch, and PostgreSQL. The skywalking-cliadmin inspect valuescommand for this API was merged in apache/skywalking-cli#232.Add the
POST /inspect/valuesadmin API to read foreign metric valuesIf this is non-trivial feature, paste the links/URLs to the design doc. — feature implementation (no SWIP); see the Inspect API doc.
Update the documentation to include this new feature. —
docs/en/setup/backend/admin-api/inspect.md+ admin-api index +CHANGES.Tests(including UT, IT, E2E) are added to verify the new feature. —
test/e2e-v2/cases/inspect/inspect-foreign-flow.shstep DataSender放弃NIO,使用标准Socket #5 across BanyanDB / ES / PostgreSQL (driven byswctl admin inspect values, cli Support application JVM info, based on instance discovery #232).If it's UI related, attach the screenshots below.
If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
Update the
CHANGESlog.🤖 Generated with Claude Code