Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
javalover123888
SkyWalking
提交
f58ecdb9
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,发现更多精彩内容 >>
提交
f58ecdb9
编写于
1月 15, 2018
作者:
L
lytscu
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'upstream/master' into develop
y
上级
c8ca51a5
ab38da59
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
121 addition
and
41 deletion
+121
-41
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/alarm.graphqls
...-ui-protocol/src/main/resources/ui-graphql/alarm.graphqls
+16
-1
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/application-layer.graphqls
.../src/main/resources/ui-graphql/application-layer.graphqls
+9
-7
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/common.graphqls
...ui-protocol/src/main/resources/ui-graphql/common.graphqls
+26
-4
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/config.graphqls
...ui-protocol/src/main/resources/ui-graphql/config.graphqls
+38
-0
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/overview-layer.graphqls
...col/src/main/resources/ui-graphql/overview-layer.graphqls
+3
-3
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/server-layer.graphqls
...tocol/src/main/resources/ui-graphql/server-layer.graphqls
+9
-8
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/service-layer.graphqls
...ocol/src/main/resources/ui-graphql/service-layer.graphqls
+1
-1
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
...-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
+18
-17
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLScriptTest.java
.../apache/skywalking/apm/ui/protocol/GraphQLScriptTest.java
+1
-0
未找到文件。
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/alarm.graphqls
浏览文件 @
f58ecdb9
type Alarm {
items: [AlarmItem!]!
count: Int!
}
type AlarmItem {
# Typical include: Application Code + cause type. This is a short description.
title: String!
# Include all related info to trigger this alarm.
# such as: threshold, trigger value, relation(greater or lower), last time
content: String!
startTime: String!
alertType: AlarmType!
causeType: CauseType!
}
enum AlarmType {
...
...
@@ -10,6 +20,11 @@ enum AlarmType {
SERVICE
}
enum CauseType {
LOW_SUCCESS_RATE,
SLOW_RESPONSE
}
extend type Query {
loadAlertList(keyword: String, alertType: AlarmType, duration:Duration!
):[AlarmItem]
loadAlertList(keyword: String, alertType: AlarmType, duration:Duration!
, paging: Pagination!): Alarm
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/application-layer.graphqls
浏览文件 @
f58ecdb9
...
...
@@ -8,20 +8,22 @@ type ApplicationNode implements Node {
# 2 Digits after floating point.
sla: Float!
# The number of incoming calls
calls: Long!
callsPerSec: Long!
# Unit: millisecond
responseTimePerSec: Int!
# ref: http://www.apdex.org/
# Max value is 1
# 2 Digits after floating point.
apdex: Float!
# Whether the application alerts?
# Default value is false.
isAlarm: Boolean!
# The number of servers in the application code
numOfServer: Int!
# The number of servers alerting
numOfServerAlarm: Int!
# The number of services alerting
numOfServiceAlarm: Int!
# Incoming request node, means User or outside system access the cluster from this.
# Recommend the UI generate a User node for each incoming node
isIncomingNode: Boolean
}
# The conjectural node generated by exit span
...
...
@@ -33,8 +35,8 @@ type ConjecturalNode implements Node {
extend type Query {
getAllApplication(duration: Duration!): [ApplicationNode
]
getAllApplication(duration: Duration!): [ApplicationNode
!]!
getApplicationTopology(applicationId: ID!, duration: Duration!): Topology
getSlowService(applicationId: ID!, duration: Duration!
): [ServiceInfo!]
getServerThroughput(applicationId: ID!, duration: Duration!
): [AppServerInfo!]
getSlowService(applicationId: ID!, duration: Duration!
, top: Int!): [ServiceInfo!]!
getServerThroughput(applicationId: ID!, duration: Duration!
, top: Int!): [AppServerInfo!]!
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/common.graphqls
浏览文件 @
f58ecdb9
schema {
query: Query
mutation: Mutation
}
#Root node
...
...
@@ -7,6 +8,10 @@ type Query {
version: String
}
type Mutation {
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.
...
...
@@ -39,6 +44,14 @@ enum Step {
SECOND
}
input Pagination {
# pageNum starts in 1, the default is 1.
pageNum: Int
pageSize: Int!
# default false
needTotal: Boolean
}
######################################
# Common Metrics and Trends
######################################
...
...
@@ -47,17 +60,17 @@ type ResponseTimeTrend {
}
type ThroughputTrend {
trendList: [Int!]
trendList: [Int!]
!
}
type SLATrend {
trendList: [Int!]
trendList: [Int!]
!
}
# The overview topology of the whole application cluster or services,
type Topology {
nodes: [Node]!
calls: [Call
]
nodes: [Node
!
]!
calls: [Call
!]!
}
# The base Node of all node types in topology
...
...
@@ -74,6 +87,15 @@ interface Node {
type: String
}
# Incoming request node, means User or outside system access the cluster from this.
type VisualUserNode implements Node {
id: ID!
# Constant, value = "User"
name: String!
# Constant, value = "USER"
type: String
}
# The Call represents a directed distributed call,
# from the `source` to the `target`.
type Call {
...
...
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/config.graphqls
0 → 100644
浏览文件 @
f58ecdb9
input TTLConfigItem {
unit: Step!
value: Int!
}
type ExistedTTLConfigs{
ttl: [TTL!]!
}
type TTL {
unit: Step!
value: Int!
}
input AlarmThreshold {
type: AlarmType!
threshold: Int!
causeType: CauseType!
}
type ExistedAlarmThresholds {
items: [ExistedAlarmThresholdItem!]!
}
type ExistedAlarmThresholdItem {
threshold: Int!
causeType: CauseType!
}
extend type Mutation {
setDataTTLConfigs(ttl: [TTLConfigItem!]!): Boolean!
setAlarmThreshold(thresholds: [AlarmThreshold!]!): Boolean!
}
extend type Query {
queryAllDataTTLConfigs: ExistedTTLConfigs!
queryAlarmThresholds(alarmType: AlarmType): ExistedAlarmThresholds!
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/overview-layer.graphqls
浏览文件 @
f58ecdb9
...
...
@@ -15,7 +15,7 @@ type AlarmTrend {
# Query all conjectural applications based on the given duration
# All applications here are not installed agent.
type ConjecturalAppBrief {
apps: [ConjecturalApp!]
apps: [ConjecturalApp!]
!
}
# The basic info of the conjectural application,
...
...
@@ -32,6 +32,6 @@ extend type Query {
getClusterBrief(duration: Duration!): ClusterBrief
getAlarmTrend(duration: Duration!): AlarmTrend
getConjecturalApps(duration: Duration!): ConjecturalAppBrief
getTopNSlowService(duration: Duration!, topN: Int!): [ServiceInfo!]
getTopNServerThroughput(duration: Duration!, topN: Int!): [AppServerInfo!]
getTopNSlowService(duration: Duration!, topN: Int!): [ServiceInfo!]
!
getTopNServerThroughput(duration: Duration!, topN: Int!): [AppServerInfo!]
!
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/server-layer.graphqls
浏览文件 @
f58ecdb9
...
...
@@ -15,25 +15,26 @@ type AppServerInfo {
}
type CPUTrend {
cost: [Int!]
cost: [Int!]
!
}
# The gc trend represents the numbers of Garbage Collector execution
type GCTrend {
youngGC: [Int!]
oldGC: [Int!]
youngGC: [Int!]
!
oldGC: [Int!]
!
}
# The memory used and max limit in heap and noheap space.
type MemoryTrend {
heap: [Int!]
maxHeap: [Int!]
noheap: [Int!]
maxNoheap: [Int!]
heap: [Int!]
!
maxHeap: [Int!]
!
noheap: [Int!]
!
maxNoheap: [Int!]
!
}
extend type Query {
searchServer(keyword: String!, duration: Duration!): [AppServerInfo]
searchServer(keyword: String!, duration: Duration!): [AppServerInfo!]!
getAllServer(applicationId: ID!, duration: Duration!): [AppServerInfo!]!
getServerResponseTimeTrend(serverId: ID!, duration: Duration!): ResponseTimeTrend
getServerTPSTrend(serverId: ID!, duration: Duration!): ThroughputTrend
getCPUTrend(serverId: ID!, duration: Duration!): CPUTrend
...
...
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/service-layer.graphqls
浏览文件 @
f58ecdb9
...
...
@@ -27,7 +27,7 @@ type TraceItem {
}
extend type Query {
searchService(keyword: String!, duration: Duration!
): [ServiceNode]
searchService(keyword: String!, duration: Duration!
, topN: Int!): [ServiceNode!]!
getServiceResponseTimeTrend(serviceId: ID!, duration: Duration!): ResponseTimeTrend
getServiceTPSTrend(serviceId: ID!, duration: Duration!): ThroughputTrend
getServiceSLATrend(serviceId: ID!, duration: Duration!): SLATrend
...
...
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
浏览文件 @
f58ecdb9
# The list of traces
type TraceBrief {
traces: [BasicTrace!]
traces: [BasicTrace!]!
total: Int!
}
# Trace basic info
...
...
@@ -23,8 +24,7 @@ input TraceQueryCondition {
minTraceDuration: Int
# The max time of trace
maxTraceDuration: Int
topN: Boolean
needTotal: Int
paging: Pagination!
}
enum QueryOrder {
...
...
@@ -34,21 +34,14 @@ enum QueryOrder {
# The trace represents a distributed trace, includes all segments and spans.
type Trace {
traceId: ID!
segments: [Segment!]
}
type Segment {
segmentId: ID!
appName: String!
isSizeLimited: Boolean!
spans: [Span!]!
}
type Span {
refs: [Ref!]
traceId: ID!
segmentId: ID!
spanId: Int!
parentSpanId: Int
!
refs: [Ref!]
!
startTime: Long!
endTime: Long!
operationName: String
...
...
@@ -60,17 +53,25 @@ type Span {
isError: Boolean
# There are 5 layers: Unknown, Database, RPCFramework, Http, MQ and Cache
layer: String
tags: [KeyValue!]
logs: [LogEntity!]
tags: [KeyValue!]
!
logs: [LogEntity!]
!
}
# Ref represents the link between the segment and its parents.
# The parent(ref) may not exists, which means batch process.
# The UI should display a list, representing the other trace IDs.
type Ref {
traceId: ID!
parentSegmentId: ID!
parentSpanId: Int!
# Ref type represents why did the ref happen.
# Include: 1) CrossProcess 2) CrossThread
type: String!
type: RefType!
}
enum RefType {
CROSS_PROCESS,
CROSS_THREAD
}
type KeyValue {
...
...
@@ -86,4 +87,4 @@ type LogEntity {
extend type Query {
queryBasicTraces(condition: TraceQueryCondition): TraceBrief
queryTrace(traceId: ID!): Trace
}
\ No newline at end of file
}
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLScriptTest.java
浏览文件 @
f58ecdb9
...
...
@@ -43,6 +43,7 @@ public class GraphQLScriptTest {
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"server-layer.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"service-layer.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"alarm.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"config.graphqls"
)));
RuntimeWiring
wiring
=
buildRuntimeWiring
();
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录