You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wa...@apache.org on 2026/09/08 08:46:20 UTC

(skywalking-query-protocol) branch master updated: TraceQueryCondition must contain either queryDuration or traceId (#171)

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

wankai123 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 8afdffc  TraceQueryCondition must contain either queryDuration or traceId (#171)
8afdffc is described below

commit 8afdffca05751cc5c7a62d451a7841a263079700
Author: Wan Kai <wa...@foxmail.com>
AuthorDate: Tue Sep 8 16:46:14 2026 +0800

    TraceQueryCondition must contain either queryDuration or traceId (#171)
    
    * TraceList.retrievedTimeRange is the required queryDuration of the condition
    
    queryTraces rejects a condition without queryDuration, so the retrieved range is always
    the given one; drop the description of an unbounded default.
    
    * TraceQueryCondition must contain either queryDuration or traceId
    
    A traceId lookup is the only trace list query allowed without a time range, so
    retrievedTimeRange is the queryDuration, or 0 to now for such a lookup.
---
 trace-v2.graphqls | 5 ++---
 trace.graphqls    | 1 +
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/trace-v2.graphqls b/trace-v2.graphqls
index 77aa7d3..073e9f1 100644
--- a/trace-v2.graphqls
+++ b/trace-v2.graphqls
@@ -16,9 +16,8 @@
 
 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 0 to now,
-    # i.e. everything the hot/warm stages retain.
+    # The time range of the traces actually retrieved, in timestamp(ms): the queryDuration of the condition,
+    # or 0 to now for a traceId lookup without queryDuration.
     retrievedTimeRange: RetrievedTimeRange!
     # For OAP internal query debugging
     debuggingTrace: DebuggingTrace
diff --git a/trace.graphqls b/trace.graphqls
index fa3c121..7fc4451 100644
--- a/trace.graphqls
+++ b/trace.graphqls
@@ -32,6 +32,7 @@ type BasicTrace {
 }
 
 # Represent the conditions used for query TraceBrief
+# The condition must contain either queryDuration or traceId.
 input TraceQueryCondition {
     # The value of 0 means all services.
     serviceId: ID