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 2023/03/14 01:41:39 UTC

[skywalking-query-protocol] branch master updated: Fix wrong return value of readNullableMetricsValue

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

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


The following commit(s) were added to refs/heads/master by this push:
     new c051e82  Fix wrong return value of readNullableMetricsValue
c051e82 is described below

commit c051e82dbef00a160210ecd65911ee27dce253bf
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Tue Mar 14 09:41:36 2023 +0800

    Fix wrong return value of readNullableMetricsValue
---
 metrics-v2.graphqls | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/metrics-v2.graphqls b/metrics-v2.graphqls
index b3c47b4..1239f12 100644
--- a/metrics-v2.graphqls
+++ b/metrics-v2.graphqls
@@ -136,6 +136,17 @@ type SelectedRecord {
     refId: ID
 }
 
+# Since 9.5.0, a value is Long type, and also nullable.
+type NullableValue {
+    # This is the value, the caller must understand the Unit.
+    # Such as:
+    # 1. If ask for cpm metric, the unit and result should be count.
+    # 2. If ask for response time (p99 or avg), the unit should be millisecond.
+    value: Long!
+    # isEmptyValue indicates whether value == 0 represents actually zero(false, default) or no data(true).
+    isEmptyValue: Boolean!
+}
+
 extend type Query {
     # Metrics definition metadata query. Response the metrics type which determines the suitable query methods.
     typeOfMetrics(name: String!): MetricsType!
@@ -147,7 +158,7 @@ extend type Query {
     readMetricsValue(condition: MetricsCondition!, duration: Duration!): Long!
     # Read metrics single value in the duration of required metrics
     # IntValues#values#isEmptyValue == true indicates no telemetry data rather than aggregated value is actually zero.
-    readNullableMetricsValue(condition: MetricsCondition!, duration: Duration!): IntValues
+    readNullableMetricsValue(condition: MetricsCondition!, duration: Duration!): NullableValue!
     # Read time-series values in the duration of required metrics
     readMetricsValues(condition: MetricsCondition!, duration: Duration!): MetricsValues!
     # Read entity list of required metrics and parent entity type.