Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
月轩居士
SkyWalking
提交
bed801b5
S
SkyWalking
项目概览
月轩居士
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
4
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,发现更多精彩内容 >>
提交
bed801b5
编写于
9月 04, 2018
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove graphQL protocol. Integrated in query module of oap backend.
上级
d0e68872
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
0 addition
and
1284 deletion
+0
-1284
apm-protocol/apm-ui-protocol/pom.xml
apm-protocol/apm-ui-protocol/pom.xml
+0
-41
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/aggregation.graphqls
...col/src/main/resources/ui-graphql-v6/aggregation.graphqls
+0
-45
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/alarm.graphqls
...-protocol/src/main/resources/ui-graphql-v6/alarm.graphqls
+0
-36
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/common.graphqls
...protocol/src/main/resources/ui-graphql-v6/common.graphqls
+0
-93
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metadata.graphqls
...otocol/src/main/resources/ui-graphql-v6/metadata.graphqls
+0
-62
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metric.graphqls
...protocol/src/main/resources/ui-graphql-v6/metric.graphqls
+0
-61
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/topology.graphqls
...otocol/src/main/resources/ui-graphql-v6/topology.graphqls
+0
-64
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/trace.graphqls
...-protocol/src/main/resources/ui-graphql-v6/trace.graphqls
+0
-118
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/README.md
...l/apm-ui-protocol/src/main/resources/ui-graphql/README.md
+0
-41
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/alarm.graphqls
...-ui-protocol/src/main/resources/ui-graphql/alarm.graphqls
+0
-47
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/application-layer.graphqls
.../src/main/resources/ui-graphql/application-layer.graphqls
+0
-64
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/common.graphqls
...ui-protocol/src/main/resources/ui-graphql/common.graphqls
+0
-132
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/config.graphqls
...ui-protocol/src/main/resources/ui-graphql/config.graphqls
+0
-54
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/overview-layer.graphqls
...col/src/main/resources/ui-graphql/overview-layer.graphqls
+0
-76
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/server-layer.graphqls
...tocol/src/main/resources/ui-graphql/server-layer.graphqls
+0
-61
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/service-layer.graphqls
...ocol/src/main/resources/ui-graphql/service-layer.graphqls
+0
-56
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
...-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
+0
-118
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLScriptTest.java
.../apache/skywalking/apm/ui/protocol/GraphQLScriptTest.java
+0
-58
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLv6ScriptTest.java
...pache/skywalking/apm/ui/protocol/GraphQLv6ScriptTest.java
+0
-56
apm-protocol/pom.xml
apm-protocol/pom.xml
+0
-1
未找到文件。
apm-protocol/apm-ui-protocol/pom.xml
已删除
100644 → 0
浏览文件 @
d0e68872
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
apm-protocol
</artifactId>
<groupId>
org.apache.skywalking
</groupId>
<version>
6.0.0-alpha-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
apm-ui-protocol
</artifactId>
<properties>
<graphql-java.version>
7.0
</graphql-java.version>
</properties>
<dependencies>
<dependency>
<groupId>
com.graphql-java
</groupId>
<artifactId>
graphql-java
</artifactId>
<version>
${graphql-java.version}
</version>
</dependency>
</dependencies>
</project>
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/aggregation.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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(condition: TopNCondition!): [TopNEntity!]!
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/alarm.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
# the trend alarm trigger times
type AlarmTrend {
numOfAlarm: [Int]!
}
type AlarmMessage {
scope: Scope!
id: ID!
message: String!
}
type Alarms {
msgs: [AlarmMessage!]!
total: Int!
}
extend type Query {
getAlarmTrend(duration: Duration!): AlarmTrend!
getAlarm(duration: Duration!, scope: Scope, paging: Pagination!): Alarms
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/common.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
schema {
query: Query
mutation: Mutation
}
#Root node
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.
# 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.
input Duration {
start: String!
end: String!
step: Step!
}
enum Step {
MONTH
DAY
HOUR
MINUTE
SECOND
}
enum Order {
ASC
DES
}
input Pagination {
# pageNum starts in 1, the default is 1.
pageNum: Int
pageSize: Int!
# default false
needTotal: Boolean
}
enum Language {
# For not language based agent, the language is impossible to tell.
UNKNOWN
JAVA
DOTNET
NODEJS
PYTHON
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/metadata.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
# Query the cluster brief based on the given duration
type ClusterBrief {
numOfService: Int!
numOfServiceInstance: Int!
numOfDatabase: Int!
numOfCache: Int!
numOfMQ: Int!
}
type Service {
id: ID!
name: String!
}
type ServiceInstance {
id: ID!
name: String!
attributes: [Attribute!]!
language: Language!
}
type Attribute {
name: String!
value: String!
}
type Endpoint {
id: ID!
name: String!
}
extend type Query {
getGlobalBrief(duration: Duration!): ClusterBrief
# Service related meta info.
getAllServices(duration: Duration!): [Service!]!
searchServices(duration: Duration!, keyword: String!): [Service!]!
# Service intance query
getServiceInstances(duration: Duration!, id: ID!): [ServiceInstance!]!
# Endpoint query
# Consider there are huge numbers of endpoint,
# must use endpoint owner's service id, keyword and limit filter to do query.
searchEndpoint(keyword: String!, serviceId: ID!, limit: Int!): [Endpoint!]!
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metric.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
input MetricCondition {
# Metric name, which should be defined in OAL script
# Such as:
# Endpoint_avg = from(Endpoint.latency).avg()
# Then, `Endpoint_avg`
name: String!
# Id in this metric type.
# In the above case, the id should be endpoint id.
id: ID
}
type LinearIntValues {
values: [KVInt!]!
}
type KVInt {
id: ID!
# This is the value, the caller must understand the Unit.
# Such as:
# 1. If ask for cpm metric, the unit and result should be count.
# 2. If ask for response time (p99 or avg), the unit should be millisecond.
value: Int!
}
type Thermodynamic {
# Each element in nodes represents a point in Thermodynamic Diagram
# And the element includes three values:
# 1) Time Bucket based on query duration
# 2) Response time index.
# Response time = [responseTimeStep * index, responseTimeStep * (index+1))
# The last element: [Response Time * index, MAX)
# 3) The number of calls in this response time duration.
#
# Example:
# [ [0, 0, 10], [0, 1, 43], ...]
# These ^^^ two represent the left bottom element, and another element above it.
nodes: [[Long]!]!
axisYStep: Int!
}
extend type Query {
getLinearIntValues(metric: MetricCondition!, duration: Duration!): LinearIntValues
getThermodynamic(metric: MetricCondition!, duration: Duration!): Thermodynamic
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/topology.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
# The overview topology of the whole application cluster or services,
type Topology {
nodes: [Node!]!
calls: [Call!]!
}
# Node in Topology
type Node {
# The global id of each node,
# 1. Service id
# 2. Endpoint id
id: ID!
# The literal name of the #id.
name: String!
# The type name may be
# 1. The service provider/middleware tech, such as: Tomcat, SpringMVC
# 2. Conjectural Service, e.g. MySQL, Redis, Kafka
type: String
# It is a conjuecture node or real node, to represent a service or endpoint.
isReal: Boolean!
}
# 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!
cpm: Long!
# Unit: millisecond
avgResponseTime: Long!
}
enum NodeType {
SERVICE,
ENDPOINT,
USER
}
extend type Query {
# Query the global topolgoy
getGlobalTopology(duration: Duration!): Topology
# Query the topology, based on the given service
getServiceTopology(serviceId: ID!, duration: Duration!): Topology
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/trace.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
# The list of traces
type TraceBrief {
traces: [BasicTrace!]!
total: Int!
}
# Trace basic info
type BasicTrace {
segmentId: String!
operationNames: [String!]!
duration: Int!
start: String!
isError: Boolean
traceIds: [String!]!
}
# Represent the conditions used for query TraceBrief
input TraceQueryCondition {
# The value of 0 means all application.
applicationId: Int
traceId: String
operationName: String
# The time range of traces started
queryDuration: Duration
# The mix time of trace
minTraceDuration: Int
# The max time of trace
maxTraceDuration: Int
traceState: TraceState!
queryOrder: QueryOrder!
paging: Pagination!
}
enum TraceState {
ALL
SUCCESS
ERROR
}
enum QueryOrder {
BY_START_TIME
BY_DURATION
}
# The trace represents a distributed trace, includes all segments and spans.
type Trace {
spans: [Span!]!
}
type Span {
traceId: ID!
segmentId: ID!
spanId: Int!
parentSpanId: Int!
refs: [Ref!]!
applicationCode: String!
startTime: Long!
endTime: Long!
operationName: String
# There are three span types: Local, Entry and Exit
type: String!
# Peer network id, e.g. host+port, ip+port
peer: String
component: String
isError: Boolean
# There are 5 layers: Unknown, Database, RPCFramework, Http, MQ and Cache
layer: String
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: RefType!
}
enum RefType {
CROSS_PROCESS,
CROSS_THREAD
}
type KeyValue {
key: String!
value: String
}
type LogEntity {
time: Long!
data: [KeyValue!]
}
extend type Query {
queryBasicTraces(condition: TraceQueryCondition): TraceBrief
queryTrace(traceId: ID!): Trace
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/README.md
已删除
100644 → 0
浏览文件 @
d0e68872
# Abstract
**apm-ui-protocol**
declares all services, using GraphQL API style, which provide by Collector UI module.
## Services
### [Common](common.graphqls)
Include common objects, which used in global
### [Overview Layer Service](overview-layer.graphqls)
Query data without specific application, server or service. It includes info for overview the whole cluster.
### [Application Layer Service](application-layer.graphqls)
Query application related data with specific application code.
### [Server Layer Service](server-layer.graphqls)
Query server related data with specific server id.
### [Service Layer Service](service-layer.graphqls)
Query service related data with specific service id
### [Trace Service](trace.graphqls)
Query trace by some conditions.
### [Alarm Service](alarm.graphqls)
Query alarm info.
## Version
v1alpha1
### Versioning
Use URI Versioning, to follow the most straightforward approach,
though it does violate the principle that a URI should refer to a unique resource.
e.g.
http://collector.host/graphql/v1alpha1
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/alarm.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
type Alarm {
items: [AlarmItem!]!
total: Int!
}
type AlarmItem {
id: ID!
# 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!
alarmType: AlarmType!
causeType: CauseType!
}
enum AlarmType {
APPLICATION,
SERVER,
SERVICE
}
enum CauseType {
LOW_SUCCESS_RATE,
SLOW_RESPONSE
}
extend type Query {
loadAlarmList(keyword: String, alarmType: AlarmType, duration:Duration!, paging: Pagination!): Alarm
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/application-layer.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
# 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 10000.
# 2 Digits after floating point in UI, need to division by 100. 10000 -> 100.00
sla: Int!
# The number of incoming calls
cpm: Long!
# Unit: millisecond
avgResponseTime: Long!
# ref: http://www.apdex.org/
# Max value is 100
# 2 Digits after floating point in UI, need to division by 100. 100 -> 1.00
apdex: Int!
# 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!
}
# The conjectural node generated by exit span
type ConjecturalNode implements Node {
id: ID!
name: String!
type: String
}
type Application {
id: ID!
name: String!
# The number of servers in the application code
numOfServer: Int!
}
extend type Query {
getAllApplication(duration: Duration!): [Application!]!
getApplicationTopology(applicationId: ID!, duration: Duration!): Topology
getSlowService(applicationId: ID!, duration: Duration!, topN: Int!): [ServiceMetric!]!
getServerThroughput(applicationId: ID!, duration: Duration!, topN: Int!): [AppServerInfo!]!
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/common.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
schema {
query: Query
mutation: Mutation
}
#Root node
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.
# 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.
input Duration {
start: String!
end: String!
step: Step!
}
enum Step {
MONTH
DAY
HOUR
MINUTE
SECOND
}
input Pagination {
# pageNum starts in 1, the default is 1.
pageNum: Int
pageSize: Int!
# default false
needTotal: Boolean
}
######################################
# Common Metrics and Trends
######################################
type ResponseTimeTrend {
trendList: [Int!]
}
type ThroughputTrend {
trendList: [Int!]!
}
type SLATrend {
trendList: [Int!]!
}
# The overview topology of the whole application cluster or services,
type Topology {
nodes: [Node!]!
calls: [Call!]!
}
# 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
}
# 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 {
source: ID!
target: ID!
isAlert: Boolean
# The protocol and tech stack used in this distributed call
callType: String!
cpm: Long!
# Unit: millisecond
avgResponseTime: Long!
}
enum ValueType {
ALL,
RIGHT,
WRONG
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/config.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
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
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
# Query the cluster brief based on the given duration
type ClusterBrief {
numOfApplication: Int
numOfService: Int
numOfDatabase: Int
numOfCache: Int
numOfMQ: Int
}
# Query the trend of alarm rate based on the given duration
type AlarmTrend {
numOfAlarmRate: [Int]!
}
# Query all conjectural applications based on the given duration
# All applications here are not installed agent.
type ConjecturalAppBrief {
apps: [ConjecturalApp!]!
}
# The basic info of the conjectural application,
# includes the type and num of same type application
type ConjecturalApp {
# The display name of the application
# e.g. MySQL, RocketMQ, Kafka, Nginx
name: String!
num: Int!
}
type ApplicationThroughput {
applicationId: Int!
applicationCode: String
cpm: Int!
}
type Thermodynamic {
# Each element in nodes represents a point in Thermodynamic Diagram
# And the element includes three values:
# 1) Time Bucket based on query duration
# 2) Response time index.
# Response time = [responseTimeStep * index, responseTimeStep * (index+1))
# The last element: [Response Time * index, MAX)
# 3) The number of calls in this response time duration.
#
# Example:
# [ [0, 0, 10], [0, 1, 43], ...]
# These ^^^ two represent the left bottom element, and another element above it.
nodes: [[Long]!]!
responseTimeStep: Int!
}
extend type Query {
getClusterTopology(duration: Duration!): Topology
getClusterBrief(duration: Duration!): ClusterBrief
getAlarmTrend(duration: Duration!): AlarmTrend
getConjecturalApps(duration: Duration!): ConjecturalAppBrief
getTopNSlowService(duration: Duration!, topN: Int!): [ServiceMetric!]!
getTopNApplicationThroughput(duration: Duration!, topN: Int!): [ApplicationThroughput!]!
getThermodynamic(duration: Duration!, type: ValueType!): Thermodynamic!
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/server-layer.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
# The server info.
# At here, `Server` represents a process in OS,
# e.g.
# 1. Spring boot application
# 2. A Tomcat server instance
type AppServerInfo {
id: ID!
osName: String!
applicationId: Int!
applicationCode: String
cpm: Int!
host: String
pid: Int
ipv4: [String!]!
}
type CPUTrend {
cost: [Int!]!
}
# The gc trend represents the numbers and time of Garbage Collector execution
type GCTrend {
youngGCCount: [Int!]!
oldGCount: [Int!]!
youngGCTime: [Int!]!
oldGCTime: [Int!]!
}
# The memory used and max limit in heap and noheap space.
type MemoryTrend {
heap: [Int!]!
maxHeap: [Int!]!
noheap: [Int!]!
maxNoheap: [Int!]!
}
extend type Query {
searchServer(keyword: String!, duration: Duration!): [AppServerInfo!]!
getAllServer(applicationId: ID!, duration: Duration!): [AppServerInfo!]!
getServerResponseTimeTrend(serverId: ID!, duration: Duration!): ResponseTimeTrend
getServerThroughputTrend(serverId: ID!, duration: Duration!): ThroughputTrend
getCPUTrend(serverId: ID!, duration: Duration!): CPUTrend
getGCTrend(serverId: ID!, duration: Duration!): GCTrend
getMemoryTrend(serverId: ID!, duration: Duration!): MemoryTrend
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/service-layer.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
type ServiceNode implements Node {
id: ID!
name: String!
type: String
# Success rate of all incoming requests.
# Max value is 10000.
sla: Int!
# The number of incoming calls
calls: Long!
# The number of services alerting
numOfServiceAlarm: Int!
}
type ServiceInfo {
id: ID!
name: String
applicationId: ID!
applicationName: String
}
type ServiceMetric {
service: ServiceInfo!
# The unit is millisecond.
avgResponseTime: Int!
cpm: Int!
}
type TraceItem {
time: String!
entry: String!
duration: Int!
}
extend type Query {
searchService(keyword: String!, applicationId: ID!, topN: Int!): [ServiceInfo!]!
getServiceResponseTimeTrend(serviceId: ID!, duration: Duration!): ResponseTimeTrend
getServiceThroughputTrend(serviceId: ID!, duration: Duration!): ThroughputTrend
getServiceSLATrend(serviceId: ID!, duration: Duration!): SLATrend
getServiceTopology(serviceId: ID!, duration: Duration!): Topology
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql/trace.graphqls
已删除
100644 → 0
浏览文件 @
d0e68872
# 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.
# The list of traces
type TraceBrief {
traces: [BasicTrace!]!
total: Int!
}
# Trace basic info
type BasicTrace {
segmentId: String!
operationNames: [String!]!
duration: Int!
start: String!
isError: Boolean
traceIds: [String!]!
}
# Represent the conditions used for query TraceBrief
input TraceQueryCondition {
# The value of 0 means all application.
applicationId: Int
traceId: String
operationName: String
# The time range of traces started
queryDuration: Duration
# The mix time of trace
minTraceDuration: Int
# The max time of trace
maxTraceDuration: Int
traceState: TraceState!
queryOrder: QueryOrder!
paging: Pagination!
}
enum TraceState {
ALL
SUCCESS
ERROR
}
enum QueryOrder {
BY_START_TIME
BY_DURATION
}
# The trace represents a distributed trace, includes all segments and spans.
type Trace {
spans: [Span!]!
}
type Span {
traceId: ID!
segmentId: ID!
spanId: Int!
parentSpanId: Int!
refs: [Ref!]!
applicationCode: String!
startTime: Long!
endTime: Long!
operationName: String
# There are three span types: Local, Entry and Exit
type: String!
# Peer network id, e.g. host+port, ip+port
peer: String
component: String
isError: Boolean
# There are 5 layers: Unknown, Database, RPCFramework, Http, MQ and Cache
layer: String
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: RefType!
}
enum RefType {
CROSS_PROCESS,
CROSS_THREAD
}
type KeyValue {
key: String!
value: String
}
type LogEntity {
time: Long!
data: [KeyValue!]
}
extend type Query {
queryBasicTraces(condition: TraceQueryCondition): TraceBrief
queryTrace(traceId: ID!): Trace
}
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLScriptTest.java
已删除
100644 → 0
浏览文件 @
d0e68872
/*
* 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.
*
*/
package
org.apache.skywalking.apm.ui.protocol
;
import
graphql.schema.idl.EchoingWiringFactory
;
import
graphql.schema.idl.RuntimeWiring
;
import
graphql.schema.idl.SchemaGenerator
;
import
graphql.schema.idl.SchemaParser
;
import
graphql.schema.idl.TypeDefinitionRegistry
;
import
java.io.File
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
public
class
GraphQLScriptTest
{
@Test
public
void
assertScriptFormat
()
{
SchemaParser
schemaParser
=
new
SchemaParser
();
SchemaGenerator
schemaGenerator
=
new
SchemaGenerator
();
TypeDefinitionRegistry
typeRegistry
=
new
TypeDefinitionRegistry
();
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"common.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"trace.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"overview-layer.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"application-layer.graphqls"
)));
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
);
}
private
File
loadSchema
(
final
String
s
)
{
return
new
File
(
GraphQLScriptTest
.
class
.
getClassLoader
().
getResource
(
"ui-graphql/"
+
s
).
getFile
());
}
private
RuntimeWiring
buildRuntimeWiring
()
{
return
RuntimeWiring
.
newRuntimeWiring
().
wiringFactory
(
new
EchoingWiringFactory
()).
build
();
}
}
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLv6ScriptTest.java
已删除
100644 → 0
浏览文件 @
d0e68872
/*
* 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.
*
*/
package
org.apache.skywalking.apm.ui.protocol
;
import
graphql.schema.idl.EchoingWiringFactory
;
import
graphql.schema.idl.RuntimeWiring
;
import
graphql.schema.idl.SchemaGenerator
;
import
graphql.schema.idl.SchemaParser
;
import
graphql.schema.idl.TypeDefinitionRegistry
;
import
java.io.File
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
public
class
GraphQLv6ScriptTest
{
@Test
public
void
assertScriptFormat
()
{
SchemaParser
schemaParser
=
new
SchemaParser
();
SchemaGenerator
schemaGenerator
=
new
SchemaGenerator
();
TypeDefinitionRegistry
typeRegistry
=
new
TypeDefinitionRegistry
();
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"common.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"trace.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"metric.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"metadata.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"topology.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"alarm.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"aggregation.graphqls"
)));
RuntimeWiring
wiring
=
buildRuntimeWiring
();
assertTrue
(
schemaGenerator
.
makeExecutableSchema
(
typeRegistry
,
wiring
).
getAllTypesAsList
().
size
()
>
0
);
}
private
File
loadSchema
(
final
String
s
)
{
return
new
File
(
GraphQLScriptTest
.
class
.
getClassLoader
().
getResource
(
"ui-graphql-v6/"
+
s
).
getFile
());
}
private
RuntimeWiring
buildRuntimeWiring
()
{
return
RuntimeWiring
.
newRuntimeWiring
().
wiringFactory
(
new
EchoingWiringFactory
()).
build
();
}
}
apm-protocol/pom.xml
浏览文件 @
bed801b5
...
...
@@ -30,6 +30,5 @@
<modules>
<module>
apm-network
</module>
<module>
apm-ui-protocol
</module>
</modules>
</project>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录