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 a4172e1 Support query trace v2 (#150)
a4172e1 is described below
commit a4172e1c5ee296ac4c89d9e310d4bb7ae9303411
Author: Wan Kai <[email protected]>
AuthorDate: Wed Sep 10 21:44:57 2025 +0800
Support query trace v2 (#150)
---
trace-v2.graphqls | 44 ++++++++++++++++++++++++++++++++++++++++++++
trace.graphqls | 2 --
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/trace-v2.graphqls b/trace-v2.graphqls
new file mode 100644
index 0000000..8cc73ed
--- /dev/null
+++ b/trace-v2.graphqls
@@ -0,0 +1,44 @@
+# 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.
+
+type TraceList {
+ traces: [TraceV2!]!
+ # The time range of the traces actually retrieved.
+ # If the queryDuration is not given, the time range is the timestamp(ms)
from now - 1day to now.
+ retrievedTimeRange: RetrievedTimeRange!
+ # For OAP internal query debugging
+ debuggingTrace: DebuggingTrace
+}
+
+type TraceV2 {
+ spans: [Span!]!
+}
+
+type RetrievedTimeRange {
+ # The start time (ms) of the traces actually retrieved.
+ startTime: Long!
+ # The end time (ms) of the traces actually retrieved.
+ endTime: Long!
+}
+
+# Param, if debug is true will enable the query tracing and return
DebuggingTrace in the result.
+extend type Query {
+ queryTraces(condition: TraceQueryCondition, debug: Boolean): TraceList
+ # Feature detection endpoint: returns true if the backend supports the
Query Traces V2 API.
+ # Returns false if the backend does not support Query Traces V2.
+ # This field is intended to assist clients in migrating to the new API.
+ hasQueryTracesV2Support: Boolean!
+}
diff --git a/trace.graphqls b/trace.graphqls
index 5a6e3e2..b3d6d6b 100644
--- a/trace.graphqls
+++ b/trace.graphqls
@@ -198,8 +198,6 @@ extend type Query {
queryBasicTracesByName(condition: TraceQueryConditionByName, debug:
Boolean): TraceBrief
# Read the specific trace ID with given trace ID
queryTrace(traceId: ID!, debug: Boolean): Trace
- # Only for BanyanDB, can be used to query the trace in the cold stage.
- queryTraceFromColdStage(traceId: ID!, duration: Duration!, debug:
Boolean): Trace
# Read the list of searchable keys
queryTraceTagAutocompleteKeys(duration: Duration!):[String!]
# Search the available value options of the given key.