Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
skywalking-query-protocol
提交
d31a45c4
S
skywalking-query-protocol
项目概览
apache
/
skywalking-query-protocol
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skywalking-query-protocol
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
d31a45c4
编写于
4月 17, 2020
作者:
wu-sheng
提交者:
GitHub
4月 17, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
New Metrics Query protocol (#39)
* Add metrics v2 query protocol
上级
707ae9de
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
138 addition
and
11 deletion
+138
-11
aggregation.graphqls
aggregation.graphqls
+3
-0
common.graphqls
common.graphqls
+1
-0
metadata.graphqls
metadata.graphqls
+0
-11
metric.graphqls
metric.graphqls
+3
-0
metrics-v2.graphqls
metrics-v2.graphqls
+128
-0
top-n-records.graphqls
top-n-records.graphqls
+3
-0
未找到文件。
aggregation.graphqls
浏览文件 @
d31a45c4
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# Legacy metrics query protocol
# Replaced by the metrics-v2 in the future
type TopNEntity {
type TopNEntity {
name: String!
name: String!
id: ID!
id: ID!
...
...
common.graphqls
浏览文件 @
d31a45c4
...
@@ -86,6 +86,7 @@ enum Language {
...
@@ -86,6 +86,7 @@ enum Language {
}
}
enum Scope {
enum Scope {
All
Service
Service
ServiceInstance
ServiceInstance
Endpoint
Endpoint
...
...
metadata.graphqls
浏览文件 @
d31a45c4
...
@@ -14,15 +14,6 @@
...
@@ -14,15 +14,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# Query the cluster brief based on the given duration
type ClusterBrief {
numOfService: Int!
numOfEndpoint: Int!
numOfDatabase: Int!
numOfCache: Int!
numOfMQ: Int!
}
type Service {
type Service {
id: ID!
id: ID!
name: String!
name: String!
...
@@ -67,8 +58,6 @@ type TimeInfo {
...
@@ -67,8 +58,6 @@ type TimeInfo {
}
}
extend type Query {
extend type Query {
getGlobalBrief(duration: Duration!): ClusterBrief
# Normal service related metainfo
# Normal service related metainfo
getAllServices(duration: Duration!): [Service!]!
getAllServices(duration: Duration!): [Service!]!
searchServices(duration: Duration!, keyword: String!): [Service!]!
searchServices(duration: Duration!, keyword: String!): [Service!]!
...
...
metric.graphqls
浏览文件 @
d31a45c4
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
# Legacy metrics query protocol
# Replaced by the metrics-v2 in the future
input MetricCondition {
input MetricCondition {
# Metric name, which should be defined in OAL script
# Metric name, which should be defined in OAL script
# Such as:
# Such as:
...
...
metrics-v2.graphqls
0 → 100644
浏览文件 @
d31a45c4
# 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.
# Metrics v2 query protocol is an alternative metrics query(s) of original v1,
# defined in the metric.graphql, top-n-records.graphqls, and aggregation.graphqls.
# By leveraging the new ID rule(no register) in the v8, we could query metrics based on name(s) directly.
type MetricsDefintion {
name: String!
valueType: MetricsType!
}
# Metrics type is a new concept since v8.
enum MetricsType {
# Regular value type is suitable for readMetricsValue, readMetricsValues and sortMetrics
REGULAR_VALUE
# Metrics value includes multiple labels, is suitable for readLabeledMetricsValues
# Label should be assigned before the query happens, such as at the setting stage
LABELED_VALUE
# Heatmap value suitable for readHeatMap
HEATMAP
# Top metrics is for readSampledRecords only. This value
SAMPLED_RECORD
}
input Entity {
# 1. scope=All, no name is required.
# 2. scope=Service, ServiceInstance and Endpoint, set neccessary serviceName/serviceInstanceName/endpointName
# 3. Scope=ServiceRelation, ServiceInstanceRelation and EndpointRelation
# serviceName/serviceInstanceName/endpointName is/are the source(s)
# destServiceName/destServiceInstanceName/destEndpointName is/are destination(s)
# set necessary names of sources and destinations.
scope: Scope!
serviceName: String
# Normal service is the service having installed agent or metrics reported directly.
# Unnormal service is conjectural service, usually detected by the agent.
isNormal: Boolean
serviceInstanceName: String
endpointName: String
destServiceName: String
# Normal service is the service having installed agent or metrics reported directly.
# Unnormal service is conjectural service, usually detected by the agent.
destIsNormal: Boolean
destServiceInstanceName: String
destEndpointName: String
}
input MetricsCondition {
# Metrics name, which should be defined in OAL script
# Such as:
# Endpoint_avg = from(Endpoint.latency).avg()
# Then, `Endpoint_avg`
name: String!
# Follow entity definition description.
entity: Entity
}
input TopNCondition {
# Metrics name
name: String!
# Follow entity definition description.
entity: Entity
topN: Int!
order: Order!
}
type MetricsValues {
# Could be null if no label assigned in the query condition
label: String
# Values of this label value.
values: IntValues
}
type HeatMap {
# Each element of values matches the time point of the query duration.
# The element in the IntValues represents the value of the same index bucket
values: [IntValues!]!
# Bucket describes the ranges of #values represent.
buckets: [Bucket!]!
}
# Bucket represents the value range.
type Bucket {
start: Int!
end: Int!
}
type TopNRecords {
# Literal string name for visualization
name: String!
# ID repesents the owner of this entity.
id: ID!
# Usually an integer as this is metrics.
value: String
# Have value, Only if the record has related trace id.
# UI should show this as an attached value.
refId: ID
}
extend type Query {
# Metrics definition metadata query. Response the metrics type which determines the suitable query methods.
typeOfMetrics(names: String!): [MetricsDefintion!]!
# Read metrics single value in the duration of required metrics for
readMetricsValue(metrics: MetricsCondition!, duration: Duration!): Int!
readMetricsValues(metrics: MetricsCondition!, duration: Duration!): [MetricsValues!]!
sortMetrics(metrics: MetricsCondition!, duration: Duration!): [TopNRecords!]!
# Read value in the given time duration, usually as a linear.
# labels: the labels you need to query.
readLabeledMetricsValues(metrics: MetricsCondition!, labels: [String!]!, duration: Duration!): [MetricsValues!]!
# Heatmap is bucket based value statistic result.
readHeatMap(metrics: MetricsCondition!, duration: Duration!): HeatMap
# Read the sampled records
readSampledRecords(metrics: TopNCondition!, order: Order!, duration: Duration!): [TopNRecords!]!
}
\ No newline at end of file
top-n-records.graphqls
浏览文件 @
d31a45c4
...
@@ -18,6 +18,9 @@
...
@@ -18,6 +18,9 @@
# Both of query results are top N, but aggregation topN query needs to do aggregation at query stage,
# Both of query results are top N, but aggregation topN query needs to do aggregation at query stage,
# the top N record query is just do order and get the list.
# the top N record query is just do order and get the list.
# Legacy metrics query protocol
# Replaced by the metrics-v2 in the future
# Top N query is based on latency order by given service and metric name.
# Top N query is based on latency order by given service and metric name.
input TopNRecordsCondition {
input TopNRecordsCondition {
serviceId: ID!
serviceId: ID!
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录