提交 06b9f5f6 编写于 作者: wu-sheng's avatar wu-sheng

1. Add set/get `DataTTLConfigs` and set/get `AlarmThreshold` mutation service.

2. All empty arrays are represented by `[]`, not `null`.
3. Add Mutation type, represents for all modification operations.
4. Support **Pagination** in some query.
5. Seperate alarm into to title and content
上级 d730e174
......@@ -2,6 +2,7 @@ type AlarmItem {
content: String!
startTime: String!
alertType: AlarmType!
causeType: CauseType!
}
enum AlarmType {
......@@ -10,6 +11,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!):[AlarmItem!]!
}
\ No newline at end of file
......@@ -35,6 +35,6 @@ type ConjecturalNode implements Node {
extend type Query {
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!]
}
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
}
type 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
......
type TTLConfigs {
items: [TTLConfigItem]!
}
type TTLConfigItem {
unit: Step!
value: Int!
}
extend type Mutation {
setDataTTLConfigs(ttl: TTLConfigs!): TTLConfigs
}
\ No newline at end of file
......@@ -15,21 +15,21 @@ 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 {
......
# 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 {
......@@ -46,7 +46,7 @@ type Segment {
}
type Span {
refs: [Ref!]
refs: [Ref!]!
spanId: Int!
parentSpanId: Int!
startTime: Long!
......@@ -60,8 +60,8 @@ 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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册