You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wu-sheng (via GitHub)" <gi...@apache.org> on 2026/06/24 14:41:25 UTC

[PR] Add POST /inspect/values admin API to read foreign metric values [skywalking]

wu-sheng opened a new pull request, #13927:
URL: https://github.com/apache/skywalking/pull/13927

   Adds an admin-only `POST /inspect/values` that 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 merged `GET /inspect/entities` foreign path (#13926).
   
   A single 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`. 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 a `400`.
   
   Verified end-to-end: OAP-B reads a foreign metric's value (`42`) across BanyanDB, Elasticsearch, and PostgreSQL. The skywalking-cli `admin inspect values` command for this API was merged in apache/skywalking-cli#232.
   
   ### Add the `POST /inspect/values` admin API to read foreign metric values
   - [x] If this is non-trivial feature, paste the links/URLs to the design doc. — feature implementation (no SWIP); see the [Inspect API doc](docs/en/setup/backend/admin-api/inspect.md).
   - [x] Update the documentation to include this new feature. — `docs/en/setup/backend/admin-api/inspect.md` + admin-api index + `CHANGES`.
   - [x] Tests(including UT, IT, E2E) are added to verify the new feature. — `test/e2e-v2/cases/inspect/inspect-foreign-flow.sh` step #5 across BanyanDB / ES / PostgreSQL (driven by `swctl admin inspect values`, cli #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 #<issue number>.
   - [x] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
   
   🤖 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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add POST /inspect/values admin API to read foreign metric values [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #13927:
URL: https://github.com/apache/skywalking/pull/13927


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org