Extend GET /inspect/entities to inspect foreign metrics persisted by any OAP#13926
Open
wu-sheng wants to merge 3 commits into
Open
Extend GET /inspect/entities to inspect foreign metrics persisted by any OAP#13926wu-sheng wants to merge 3 commits into
GET /inspect/entities to inspect foreign metrics persisted by any OAP#13926wu-sheng wants to merge 3 commits into
Conversation
…any OAP The inspect admin API could only enumerate entities for metrics defined on the queried OAP. Extend it so a metric persisted by ANY OAP — one this node never loaded the OAL/MAL/runtime-rule for — can be inspected when the caller supplies the metric's valueColumn + valueType. The backend resolves the physical index/table/group from its own running config (no DB schema read): ES uses the merged metrics-all index + metric_table discriminator, JDBC probes the node's function tables by the table_name discriminator, BanyanDB synthesizes a read-only measure schema. entity_id is decoded structurally (scope-free); locally-defined metrics keep exact field names, scope and mqeEntity. Adds a two-OAP inspect e2e (aware + foreign) across BanyanDB/ES/PostgreSQL driven by 'swctl admin inspect entities --value-column/--value-type' (apache/skywalking-cli#230; SW_CTL_COMMIT bumped to the cli commit that includes the flags).
The listEntities javadoc used @param valueColumn / @param valueType, but the Optional parameters are named valueColumnOpt / valueTypeOpt, so javadoc failed with 'error: @param name not found' (failOnError), breaking the dist build and every dependent e2e job. Move the valueColumn/valueType documentation into the method-description list so there are no @param tags to mismatch.
Metrics is not imported in TableHelper (only used in the doc), so JDK 11's
doclint rejects the simple-name {@link} with 'reference not found', failing the
dist build at :storage-jdbc-hikaricp-plugin. Newer local JDKs (21/25) resolve it
via the classpath and don't flag it. Use {@code Metrics} to match the sibling
{@code ServiceTraffic}/... refs — no import, no reference resolution. Verified
the javadoc build of all changed modules under temurin-11.
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.
Extend
GET /inspect/entitiesto inspect a metric persisted by any OAP (foreign metric)/inspect/entitiespreviously enumerated entities only for metrics defined on the queried OAP. This extends it so a metric persisted by any OAP — one this node never loaded the OAL/MAL/runtime-rule for — can be inspected when the caller supplies the metric'svalueColumn+valueType.metrics-allindex +metric_tablediscriminator.table_namediscriminator.entity_idis decoded structurally (service / 2nd-level / relations) with a genericnameleaf; scope is no longer required for the foreign path.mqeEntity(behavior unchanged).valueColumn/valueTypereturns a clear400steering the caller to the foreign path.swctl admin inspect entitiesgains--value-column/--value-type(apache/skywalking-cli#230);SW_CTL_COMMITis bumped to the cli commit that ships them, and a 2-OAP inspect e2e (aware + foreign) is wired across BanyanDB / ES / PostgreSQL.docs/en/setup/backend/admin-api/inspect.md)EntityDecoderTest+test/e2e-v2/cases/inspect/across BanyanDB/ES/PostgreSQL)CHANGESlog.