You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/10/17 09:11:41 UTC

[skywalking-query-protocol] branch new-sample-query created (now 2505559)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a change to branch new-sample-query
in repository https://gitbox.apache.org/repos/asf/skywalking-query-protocol.git


      at 2505559  Add new record query protocol.

This branch includes the following new commits:

     new 2505559  Add new record query protocol.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking-query-protocol] 01/01: Add new record query protocol.

Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch new-sample-query
in repository https://gitbox.apache.org/repos/asf/skywalking-query-protocol.git

commit 2505559f957eb11e2ea978102ba21fd059742b90
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Mon Oct 17 17:11:35 2022 +0800

    Add new record query protocol.
---
 metrics-v2.graphqls |  1 +
 record.graphqls     | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/metrics-v2.graphqls b/metrics-v2.graphqls
index f46f0ca..35be22d 100644
--- a/metrics-v2.graphqls
+++ b/metrics-v2.graphqls
@@ -153,6 +153,7 @@ extend type Query {
     readLabeledMetricsValues(condition: MetricsCondition!, labels: [String!]!, duration: Duration!): [MetricsValues!]!
     # Heatmap is bucket based value statistic result.
     readHeatMap(condition: MetricsCondition!, duration: Duration!): HeatMap
+    # Deprecated since 9.3.0, replaced by readRecords defined in record.graphqls
     # Read the sampled records
     # TopNCondition#scope is not required.
     readSampledRecords(condition: TopNCondition!, duration: Duration!): [SelectedRecord!]!
diff --git a/record.graphqls b/record.graphqls
new file mode 100644
index 0000000..ca5f1cb
--- /dev/null
+++ b/record.graphqls
@@ -0,0 +1,47 @@
+# 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.
+
+# Since 9.3.0
+# Record is a general and abstract type for collected raw data.
+# In the observability, traces and logs have specific and well-defined meanings, and the general records represent other
+# collected records. Such as sampled slow SQL statement, HTTP request raw data(request/response header/body)
+extend type Query {
+    # Query collected records with given metric name and parent entity conditions, and return in the requested order.
+    readRecords(condition: RecordCondition!, duration: Duration!): [Record!]!
+}
+
+input RecordCondition {
+    # Metrics name
+    # The scope of this metric is required to match the scope of the parent entity.
+    name: String!
+    # Follow entity definition description.
+    # The owner of the sampled records
+    parentEntity: Entity!
+    topN: Int!
+    order: Order!
+}
+
+type Record {
+    # Literal string name for visualization
+    name: String!
+    # ID of this record
+    id: ID!
+    # Usually an integer value as this is a metric to measure this entity ID.
+    value: String
+    # Have value, Only if the record has related trace id.
+    # UI should show this as an attached value.
+    refId: ID
+}
\ No newline at end of file