Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
282b5931
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 大约 1 年
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
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,体验更适合开发者的 AI 搜索 >>
提交
282b5931
编写于
7月 27, 2018
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v6 query protocol.
上级
23488dac
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
266 addition
and
7 deletion
+266
-7
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/common.graphqls
...protocol/src/main/resources/ui-graphql-v6/common.graphqls
+14
-0
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/jvm.graphqls
...ui-protocol/src/main/resources/ui-graphql-v6/jvm.graphqls
+41
-0
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metric.graphqls
...protocol/src/main/resources/ui-graphql-v6/metric.graphqls
+14
-6
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/overview.graphqls
...otocol/src/main/resources/ui-graphql-v6/overview.graphqls
+24
-1
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/topology.graphqls
...otocol/src/main/resources/ui-graphql-v6/topology.graphqls
+0
-0
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/trace.graphql
...i-protocol/src/main/resources/ui-graphql-v6/trace.graphql
+0
-0
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/trace.graphqls
...-protocol/src/main/resources/ui-graphql-v6/trace.graphqls
+118
-0
apm-protocol/apm-ui-protocol/src/test/java/org/apache/skywalking/apm/ui/protocol/GraphQLv6ScriptTest.java
...pache/skywalking/apm/ui/protocol/GraphQLv6ScriptTest.java
+55
-0
未找到文件。
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/common.graphql
→
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/common.graphql
s
浏览文件 @
282b5931
...
...
@@ -60,6 +60,11 @@ enum Step {
SECOND
}
enum Order {
ASC
DES
}
input Pagination {
# pageNum starts in 1, the default is 1.
pageNum: Int
...
...
@@ -68,3 +73,12 @@ input Pagination {
needTotal: Boolean
}
enum Language {
# For not language based agent, the language is impossible to tell.
UNKNOWN
JAVA
DOTNET
NODEJS
PYTHON
RUBY
}
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/jvm.graphqls
0 → 100644
浏览文件 @
282b5931
# 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 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 {
getJVMCPUTrend(serviceInstanceId: ID!, duration: Duration!): CPUTrend
getJVMGCTrend(serviceInstanceId: ID!, duration: Duration!): GCTrend
getJVMMemoryTrend(serviceInstanceId: ID!, duration: Duration!): MemoryTrend
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metric.graphql
→
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/metric.graphql
s
浏览文件 @
282b5931
...
...
@@ -23,12 +23,6 @@ input MetricCondition {
# Id in this metric type.
# In the above case, the id should be endpoint id.
id: ID
topN
:
TopN
}
# TopN filter
input
TopN
{
n
:
Int
!
}
type LinearIntValues {
...
...
@@ -60,7 +54,21 @@ type Thermodynamic {
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 {
getLinearIntValues(metric: MetricCondition!, duration: Duration!): LinearIntValues
getThermodynamic(metric: MetricCondition!, duration: Duration!): Thermodynamic
getTopN(metric: MetricTopNCondition!): [MetricEntity!]!
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/overview.graphql
→
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/overview.graphql
s
浏览文件 @
282b5931
...
...
@@ -34,12 +34,35 @@ type Service {
}
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
getAlarmTrend(duration: Duration!): AlarmTrend
getAllService
(
duration
:
Duration
!):
[
Service
!]!
# 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 top N filter to do query.
searchEndpoint(keyword: String!, serviceId: ID!, topNFilter: MetricTopNCondition!): [Endpoint!]!
}
\ No newline at end of file
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/topology.graphql
→
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/topology.graphql
s
浏览文件 @
282b5931
文件已移动
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/trace.graphql
已删除
100644 → 0
浏览文件 @
23488dac
apm-protocol/apm-ui-protocol/src/main/resources/ui-graphql-v6/trace.graphqls
0 → 100644
浏览文件 @
282b5931
# 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/GraphQLv6ScriptTest.java
0 → 100644
浏览文件 @
282b5931
/*
* 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
(
"overview.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"topology.graphqls"
)));
typeRegistry
.
merge
(
schemaParser
.
parse
(
loadSchema
(
"jvm.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
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录