From d07a91353cf86e4a702cb59d77b8d2ca430c44d3 Mon Sep 17 00:00:00 2001 From: wu-sheng Date: Tue, 26 Dec 2017 10:50:05 +0800 Subject: [PATCH] Adjust the services and add comments. --- .../main/resources/ui-graphql/common.graphqls | 20 +++++++++- .../ui-graphql/overview-layer.graphqls | 40 ++++++++++++++++--- 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/common.graphqls b/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/common.graphqls index 910fdb7dc..91d6ba352 100644 --- a/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/common.graphqls +++ b/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/common.graphqls @@ -6,8 +6,26 @@ type Query { version: String } +# The Duration defines the start and end time for each query operation. +# Fields: `start` and `end` +# represents the time span. And each of them matches the step. +# ref https://www.ietf.org/rfc/rfc3339.txt +# The time formats are +# `SECOND` step: yyyy-MM-dd HHmmss +# `MINUTE` step: yyyy-MM-dd HHmm +# `HOUR` step: yyyy-MM-dd HH +# `DAY` step: yyyy-MM-dd +# `MONTH` step: yyyy-MM +# Field: `step` +# represents the accurate time point. +# e.g. +# if step==HOUR , start=2017-11-08 09, end=2017-11-08 19 +# then +# metrics from the following time points expected +# 2017-11-08 9:00 -> 2017-11-08 19:00 +# there are 11 time points (hours) in the time span. type Duration{ - start: String! # https://www.ietf.org/rfc/rfc3339.txt + start: String! end: String! step: Step! } diff --git a/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/overview-layer.graphqls b/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/overview-layer.graphqls index 299561425..437e10466 100644 --- a/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/overview-layer.graphqls +++ b/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/overview-layer.graphqls @@ -1,36 +1,66 @@ +# The overview topology of the whole application cluster, +# which includes all applications and dependencies, e.g. MQ, Database, Cache, outside Web Service type ApplicationTopology { nodes: [Node]! - edges: [Edge] + calls: [Call] duration: Duration! } +# The base Node of all node types in topology interface Node { + # The global id of each node, + # 1. `Application ID` represents application under monitoring + # 2. `Peer ID` string represents the conjectural dependency. id: ID! + # Application Code or literal Peer name: String! + # The type name + # 1. The most important component in the application, from service provider perspective. + # 2. Conjectural dependent component, e.g. MySQL, Redis, Kafka type: String } +# ApplicationNode represents this node is under monitoring by agent. type ApplicationNode implements Node { id: ID! name: String! type: String + # Success rate of all incoming requests. + # Max value is 100. + # 2 Digits after floating point. sla: Float! + # The number of incoming calls calls: Long! + # ref: http://www.apdex.org/ + # Max value is 1 + # 2 Digits after floating point. apdex: Float! - totalInstance: Int! - totalAlert: Int! + # The number of servers in the application code + numOfServer: Int! + # The number of servers alerting + numOfServerAlarm: Int! + # The number of services alerting + numOfServiceAlarm: Int! } -type ResourceNode implements Node { +# The conjectural node generated by exit span +type ConjecturalNode implements Node { id: ID! name: String! type: String } -type Edge { +# The Call represents a directed distributed call, +# from the `source` to the `target`. +type Call { source: ID! target: ID! isAlert: Boolean + # The protocol and tech stack used in this distributed call + callType: String! + callsPerSec: Int! + # Unit: millisecond + responseTimePerSec: Int! } extend type Query {