Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
javalover123888
SkyWalking
提交
cb69e968
S
SkyWalking
项目概览
javalover123888
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / SkyWalking
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cb69e968
编写于
7月 30, 2018
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor the graphQL query protocol. @hanahmily @peng-yongsheng
上级
3cbf04fe
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
70 addition
and
39 deletion
+70
-39
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/aggregation.graphqls
...col/src/main/resources/ui-graphql-v6/aggregation.graphqls
+45
-0
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/alarm.graphqls
...-protocol/src/main/resources/ui-graphql-v6/alarm.graphqls
+12
-17
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/common.graphqls
...protocol/src/main/resources/ui-graphql-v6/common.graphqls
+9
-0
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metadata.graphqls
...otocol/src/main/resources/ui-graphql-v6/metadata.graphqls
+1
-7
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metric.graphqls
...protocol/src/main/resources/ui-graphql-v6/metric.graphqls
+0
-13
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLv6ScriptTest.java
...pache/skywalking/apm/ui/protocol/GraphQLv6ScriptTest.java
+3
-2
未找到文件。
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/aggregation.graphqls
0 → 100644
浏览文件 @
cb69e968
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Match the metric by name, order by metric value(such as: avg, percent)
input TopNCondition {
name: String!
topN: Int!
order: Order!
# When the scope is ServiceInstance or Endpoint,
# most likely you need a secondary filter.
# Such as:
# 1. Get topN service instance in a given service id
# 2. Get topN endpoint in a given serivce id.
# Backend will decide the filter id meaning by Scope.
#
# Defintely, it is not required by default.
filterScope: Scope
filterId: Int
}
type TopNEntity {
name: String!
id: ID!
value: Int!
}
# The aggregation query is different with the metric query.
# All aggregation queries require backend or/and storage do aggregation in query time.
extend type Query {
# TopN is an aggregation query.
getTopN(metric: TopNCondition!): [TopNEntity!]!
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/
jv
m.graphqls
→
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/
alar
m.graphqls
浏览文件 @
cb69e968
...
@@ -14,28 +14,23 @@
...
@@ -14,28 +14,23 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
type CPUTrend {
# the trend alarm trigger times
cost: [Int!]!
type AlarmTrend {
numOfAlarm: [Int]!
}
}
# The gc trend represents the numbers and time of Garbage Collector execution
type AlarmMessage {
type GCTrend {
scope: Scope!
youngGCCount: [Int!]!
id: ID!
oldGCount: [Int!]!
message: String!
youngGCTime: [Int!]!
oldGCTime: [Int!]!
}
}
# The memory used and max limit in heap and noheap space.
type Alarms {
type MemoryTrend {
msgs: [AlarmMessage!]!
heap: [Int!]!
total: Int!
maxHeap: [Int!]!
noheap: [Int!]!
maxNoheap: [Int!]!
}
}
extend type Query {
extend type Query {
getJVMCPUTrend(serviceInstanceId: ID!, duration: Duration!): CPUTrend
getAlarmTrend(duration: Duration!): AlarmTrend!
getJVMGCTrend(serviceInstanceId: ID!, duration: Duration!): GCTrend
getAlarm(duration: Duration!, scope: Scope, paging: Pagination!): Alarms
getJVMMemoryTrend(serviceInstanceId: ID!, duration: Duration!): MemoryTrend
}
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/common.graphqls
浏览文件 @
cb69e968
...
@@ -82,3 +82,12 @@ enum Language {
...
@@ -82,3 +82,12 @@ enum Language {
PYTHON
PYTHON
RUBY
RUBY
}
}
enum Scope {
SERVICE
SERVICE_INSTANCE
ENDPOINT
SERVICE_RELATION
SERVICE_INSTANCE_RELATION
ENDPOINT_RELATION
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/
overview
.graphqls
→
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/
metadata
.graphqls
浏览文件 @
cb69e968
...
@@ -23,11 +23,6 @@ type ClusterBrief {
...
@@ -23,11 +23,6 @@ type ClusterBrief {
numOfMQ: Int!
numOfMQ: Int!
}
}
# Query the trend of alarm rate based on the given duration
type AlarmTrend {
numOfAlarmRate: [Int]!
}
type Service {
type Service {
id: ID!
id: ID!
name: String!
name: String!
...
@@ -52,7 +47,6 @@ type Endpoint {
...
@@ -52,7 +47,6 @@ type Endpoint {
extend type Query {
extend type Query {
getGlobalBrief(duration: Duration!): ClusterBrief
getGlobalBrief(duration: Duration!): ClusterBrief
getAlarmTrend(duration: Duration!): AlarmTrend
# Service related meta info.
# Service related meta info.
getAllServices(duration: Duration!): [Service!]!
getAllServices(duration: Duration!): [Service!]!
...
@@ -64,5 +58,5 @@ extend type Query {
...
@@ -64,5 +58,5 @@ extend type Query {
# Endpoint query
# Endpoint query
# Consider there are huge numbers of endpoint,
# Consider there are huge numbers of endpoint,
# must use endpoint owner's service id, keyword and top N filter to do query.
# must use endpoint owner's service id, keyword and top N filter to do query.
searchEndpoint(keyword: String!, serviceId: ID!, topN
Filter: MetricTopNCondition
!): [Endpoint!]!
searchEndpoint(keyword: String!, serviceId: ID!, topN
: Int
!): [Endpoint!]!
}
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metric.graphqls
浏览文件 @
cb69e968
...
@@ -54,21 +54,8 @@ type Thermodynamic {
...
@@ -54,21 +54,8 @@ type Thermodynamic {
axisYStep: Int!
axisYStep: Int!
}
}
# Match the metric by name, order by metric value(such as: avg, percent)
input MetricTopNCondition {
name: String!
topN: Int!
order: Order!
}
type MetricEntity {
name: String!
id: ID!
value: Int!
}
extend type Query {
extend type Query {
getLinearIntValues(metric: MetricCondition!, duration: Duration!): LinearIntValues
getLinearIntValues(metric: MetricCondition!, duration: Duration!): LinearIntValues
getThermodynamic(metric: MetricCondition!, duration: Duration!): Thermodynamic
getThermodynamic(metric: MetricCondition!, duration: Duration!): Thermodynamic
getTopN(metric: MetricTopNCondition!): [MetricEntity!]!
}
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLv6ScriptTest.java
浏览文件 @
cb69e968
...
@@ -38,9 +38,10 @@ public class GraphQLv6ScriptTest {
...
@@ -38,9 +38,10 @@ public class GraphQLv6ScriptTest {
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"common.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"common.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"trace.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"trace.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"metric.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"metric.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"
overview
.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"
metadata
.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"topology.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"topology.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"jvm.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"alarm.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"aggregation.graphqls"
)));
RuntimeWiring
wiring
=
buildRuntimeWiring
();
RuntimeWiring
wiring
=
buildRuntimeWiring
();
assertTrue
(
schemaGenerator
.
makeExecutableSchema
(
typeRegistry
,
wiring
).
getAllTypesAsList
().
size
()
>
0
);
assertTrue
(
schemaGenerator
.
makeExecutableSchema
(
typeRegistry
,
wiring
).
getAllTypesAsList
().
size
()
>
0
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录