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
This commit is contained in:
wu-sheng 2018-01-10 16:38:22 +08:00
parent d730e174f6
commit 06b9f5f692
6 changed files with 51 additions and 20 deletions

View File

@ -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!]!
}

View 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!]
}

View File

@ -1,5 +1,6 @@
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

View File

@ -0,0 +1,12 @@
type TTLConfigs {
items: [TTLConfigItem]!
}
type TTLConfigItem {
unit: Step!
value: Int!
}
extend type Mutation {
setDataTTLConfigs(ttl: TTLConfigs!): TTLConfigs
}

View 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 {

View File

@ -1,6 +1,7 @@
# 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.