This is an automated email from the ASF dual-hosted git repository. wankai pushed a commit to branch trace-v2 in repository https://gitbox.apache.org/repos/asf/skywalking-query-protocol.git
commit 80d8a11db3f00649a2fd4f9295bb4e6dbba409e4 Author: wankai123 <wankai...@foxmail.com> AuthorDate: Wed Sep 10 20:58:38 2025 +0800 Support query trace v2 --- trace-v2.graphqls | 41 +++++++++++++++++++++++++++++++++++++++++ trace.graphqls | 2 -- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/trace-v2.graphqls b/trace-v2.graphqls new file mode 100644 index 0000000..542958f --- /dev/null +++ b/trace-v2.graphqls @@ -0,0 +1,41 @@ +# 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 + 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.