Service/Application Dependency Graph Implement#1460
Open
ambiguous-pointer wants to merge 6 commits intoapache:developfrom
Open
Service/Application Dependency Graph Implement#1460ambiguous-pointer wants to merge 6 commits intoapache:developfrom
ambiguous-pointer wants to merge 6 commits intoapache:developfrom
Conversation
…cessary blank lines
…sion apache#1398 * feat(api): add GraphServices endpoint for service-level topology Based on discussion apache#1398, use ServiceProviderMetadata and ServiceConsumerMetadata to return provider/consumer application relations as graph nodes and edges for AntV G6. * feat(api): add GraphApplications endpoint for application-level topology Traverse provider/consumer service relations to build application-level graph. Also add idx_service_consumer_service_key index to support efficient serviceKey queries. * feat(api): add graph models (GraphNode, GraphEdge, GraphData) in pkg/console/model/graph.go * feat(api): add ApplicationGraphReq, ServiceGraphReq and GetApplicationGraph, GetServiceGraph handlers * feat(router): register /application/graph and /service/graph routes * feat(api): fix error handling to use direct err pass-through instead of MeshNotFoundError
…he#1430](apache#1430)) * feat(api): replace Service.{providers,consumers,features} with {methods} field Simplify Service proto by removing providers, consumers, and features map, keeping only the aggregated methods list derived from provider metadata. * feat(api): derive Service resource from ServiceProviderMetadata on add/update/delete ServiceProviderMetadataEventSubscriber now maintains Service resources by aggregating methods from all provider instances sharing the same serviceKey. Handles add, update, and delete events to keep Service spec in sync. * feat(api): add language detection from provider metadata parameters Detect provider language (golang/java) from metadata parameters and method type signatures when explicit language field is absent. * feat(api): add GetServiceDetail endpoint returning language and methods Add GET /service/detail returning ServiceDetailResp with language and aggregated method names from the derived Service resource. * feat(api): add BuildServiceIdentityKey helper for {service}:{version}:{group} * feat(api): add ByServiceName index for ServiceKind * feat(api): refactor SearchServices to query ServiceResource directly SearchServices and SearchServicesByKeywords now use ServiceResource instead of ServiceProviderMetadataResource for service listing. * feat(api): remove providerAppName from ServiceSearchResp and ServiceTabDistributionReq * feat(api): add ServiceDetailReq and ServiceDetailResp models * feat(router): register /service/detail and /service/interfaces routes * feat(ui-vue3): remove providerAppName from grafana types and tab components
|
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.



This change introduces a complete service and application topology visualization feature based on
discussion #1398 and
issue #1430.
It adds both backend graph APIs and frontend AntV G6 visualization for tracing upstream/downstream
relationships via
ServiceProviderMetadataResourceandServiceConsumerMetadataResource.📌 What’s New
Application-level topology graph
GET /application/graphreturns provider/consumer application relations as typed nodesand edges. Each node declares its
type(application) andrule(provider/consumer/empty).Service-level topology graph
GET /service/graphreturns provider/consumer applications for a given service as a graph.A central
servicenode is connected to provider and consumer app nodes.Service detail API
GET /service/detailreturns aggregated service metadata (language, method names) derivedfrom all provider instances sharing the same
serviceKey.Service resource derivation
ServiceProviderMetadataEventSubscribernow maintainsServiceresources by aggregatingmethods from all provider instances. Language is auto-detected from provider metadata
parameters and method type signatures (golang/java).
Graph payload structure
{ "code": "Success", "message": "success", "data": { "nodes": [ { "id": "order-service", "label": "order-service", "type": "application", "rule": "provider" }, { "id": "com.ecommerce.api.service.OrderService::", "label": "com.ecommerce.api.service.OrderService::", "type": "service", "rule": "" }, { "id": "payment-service", "label": "payment-service", "type": "application", "rule": "consumer" } ], "edges": [ { "source": "com.ecommerce.api.service.OrderService::", "target": "order-service", "data": { "type": "provides" } }, { "source": "payment-service", "target": "com.ecommerce.api.service.OrderService::", "data": { "type": "consumes" } } ] } }New Topology tab components for both Applications and Services pages, rendered using AntV G6
with Vue-node integration. Clicking a node opens a detail drawer.
Service.{providers,consumers,features} replaced with a single methods []string field,
derived by aggregating method names from all provider instances.
📁 Affected Areas / Review Checklist