From 6b68a2cb6db49e04cc315d679021f54fc75e6084 Mon Sep 17 00:00:00 2001 From: wusheng Date: Sat, 30 Dec 2017 17:59:20 +0800 Subject: [PATCH] * `DurationItem` and `ThroughputItem` have been removed. Service defines must be explicit and clear. * In server layer, AppServerInfo type represents the basic server info and related metrics * In service layer, ServiceInfo type represents the basic service info and related metrics * `getServiceSlowTrace` service has been provided by `queryBasicTraces` service. All trace query should be included in that. --- .../resources/ui-graphql/application-layer.graphqls | 8 ++++---- .../src/main/resources/ui-graphql/common.graphqls | 12 ------------ .../resources/ui-graphql/overview-layer.graphqls | 4 ++-- .../main/resources/ui-graphql/service-layer.graphqls | 11 +++++++++-- 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/application-layer.graphqls b/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/application-layer.graphqls index 572b038ea..ef9fc7007 100644 --- a/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/application-layer.graphqls +++ b/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/application-layer.graphqls @@ -31,7 +31,7 @@ type ConjecturalNode implements Node { extend type Query { getAllApplication(duration: Duration!): [ApplicationNode] - getApplicationTopology(appId: ID!, duration: Duration!): Topology - getSlowService(appId: ID!, duration: Duration!): [DurationItem] - getServerThroughput(appId: ID!, duration: Duration!): [ThroughputItem] -} \ No newline at end of file + getApplicationTopology(applicationId: ID!, duration: Duration!): Topology + getSlowService(applicationId: ID!, duration: Duration!): [ServiceInfo!] + getServerThroughput(applicationId: ID!, duration: Duration!): [AppServerInfo!] +} 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 0520b4b20..853f36258 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 @@ -86,15 +86,3 @@ type Call { # Unit: millisecond responseTimePerSec: Int! } - -# The item of slow service list -type DurationItem { - name: String! - duration: Int! -} - -# The item of throughput list -type ThroughputItem { - name: String! - tps: Int! -} \ No newline at end of file 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 aae527e31..e7b0bc2d6 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 @@ -32,6 +32,6 @@ extend type Query { getClusterBrief(duration: Duration!): ClusterBrief getAlarmTrend(duration: Duration!): AlarmTrend getConjecturalApps(duration: Duration!): ConjecturalAppBrief - getTopNSlowService(duration: Duration!, topN: Int!): [DurationItem] - getTopNServerThroughput(duration: Duration!, topN: Int!): [ThroughputItem] + getTopNSlowService(duration: Duration!, topN: Int!): [ServiceInfo!] + getTopNServerThroughput(duration: Duration!, topN: Int!): [AppServerInfo!] } diff --git a/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/service-layer.graphqls b/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/service-layer.graphqls index 2d7a90685..3e33c8f9e 100644 --- a/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/service-layer.graphqls +++ b/apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/service-layer.graphqls @@ -12,6 +12,14 @@ type ServiceNode implements Node { numOfServiceAlarm: Int! } +type ServiceInfo { + id: ID! + name: String + # The unit is millisecond. + avgResponseTime: Int! + tps: Int! +} + type TraceItem { time: String! entry: String! @@ -24,5 +32,4 @@ extend type Query { getServiceTPSTrend(serviceId: ID!, duration: Duration!): ThroughputTrend getServiceSLATrend(serviceId: ID!, duration: Duration!): SLATrend getServiceTopology(serviceId: ID!, duration: Duration!): Topology - getServiceSlowTrace(serviceId: ID!, duration: Duration!): [TraceItem] -} \ No newline at end of file +} -- GitLab