Skip to content

GraphQL API: metadata, topology, log and trace support query by name.#13388

Merged
wu-sheng merged 5 commits intoapache:masterfrom
wankai123:graphql-query-by-name
Jul 29, 2025
Merged

GraphQL API: metadata, topology, log and trace support query by name.#13388
wu-sheng merged 5 commits intoapache:masterfrom
wankai123:graphql-query-by-name

Conversation

@wankai123
Copy link
Copy Markdown
Member

@wankai123 wankai123 added this to the 10.3.0 milestone Jul 29, 2025
@wankai123 wankai123 requested review from Copilot and wu-sheng July 29, 2025 01:07
@wankai123 wankai123 added backend OAP backend related. enhancement Enhancement on performance or codes labels Jul 29, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds GraphQL API support for querying metadata, topology, logs, and traces using human-readable names instead of internal IDs. The implementation introduces new condition classes that accept service names, instance names, and endpoint names with optional layer information to generate appropriate IDs internally.

Key changes:

  • New query methods that accept name-based conditions for all major GraphQL query types
  • Introduction of ServiceCondition, InstanceCondition, and EndpointCondition classes for ID generation
  • Service ID validation in topology queries to filter out non-existent services
  • Updated GraphQL schema documentation to reflect the new query methods

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
query-protocol Updates subproject commit reference
TraceQuery.java Adds queryBasicTracesByName method with TraceQueryConditionByName parameter
TopologyQuery.java Adds topology query methods that accept name-based conditions
MetadataQueryV2.java Adds metadata query methods supporting ServiceCondition parameter
LogQuery.java Adds queryLogsByName method with LogQueryConditionByName parameter
TraceQueryConditionByName.java New condition class for trace queries using names
ServiceCondition.java New condition class for service identification by name and layer
LogQueryConditionByName.java New condition class for log queries using names
InstanceCondition.java New condition class for instance identification by name
EndpointCondition.java New condition class for endpoint identification by name
TopologyQueryService.java Adds service existence validation and removes IOException from getService
MetadataQueryService.java Removes IOException from getService method signature
query-tracing.md Updates documentation with new GraphQL query methods
changes.md Adds changelog entry for the feature
query-protocol.md Updates API documentation with new query methods

@wu-sheng wu-sheng merged commit 859a462 into apache:master Jul 29, 2025
174 checks passed
@wankai123 wankai123 deleted the graphql-query-by-name branch July 29, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related. enhancement Enhancement on performance or codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support name and normal status flag as service ID alternative in GraphQL

3 participants