Package zipkin2.storage
Class QueryRequest
java.lang.Object
zipkin2.storage.QueryRequest
Invoking this request retrieves traces matching the below filters.
Results should be filtered against endTs
, subject to limit
and lookback
. For example, if endTs is 10:20 today, limit is 10, and lookback is 7 days, traces
returned should be those nearest to 10:20 today, not 10:20 a week ago.
Time units of endTs
and lookback
are milliseconds as opposed to
microseconds, the grain of Span.timestamp()
. Milliseconds is a more familiar and
supported granularity for query, index and windowing functions.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionWhen an input value is the empty string, include traces whoseSpan.annotations()
include a value in this set, or whereSpan.tags()
include a key is in this set.Corresponds to query parameter "annotationQuery".long
endTs()
Only return traces where allSpan.timestamp()
are at or before this time in epoch milliseconds.int
limit()
Maximum number of traces to return.long
lookback()
Only return traces where allSpan.timestamp()
are at or after (endTs - lookback) in milliseconds.Only return traces whoseSpan.duration()
is less than or equal to maxDuration microseconds.Only return traces whoseSpan.duration()
is greater than or equal to minDuration microseconds.static QueryRequest.Builder
When present, only include traces with thisremote service name
.When present, corresponds to thelocal service name
and constrains all other parameters.spanName()
When present, only include traces with thisSpan.name()
boolean
Tests the supplied trace against the current request.toString()
-
Method Details
-
serviceName
When present, corresponds to thelocal service name
and constrains all other parameters.- See Also:
-
remoteServiceName
When present, only include traces with thisremote service name
. -
spanName
When present, only include traces with thisSpan.name()
- See Also:
-
annotationQuery
When an input value is the empty string, include traces whoseSpan.annotations()
include a value in this set, or whereSpan.tags()
include a key is in this set. When not, include traces whoseSpan.tags()
an entry in this map.Multiple entries are combined with AND, and AND against other conditions.
-
minDuration
Only return traces whoseSpan.duration()
is greater than or equal to minDuration microseconds. -
maxDuration
Only return traces whoseSpan.duration()
is less than or equal to maxDuration microseconds. Only valid withminDuration
. -
endTs
public long endTs()Only return traces where allSpan.timestamp()
are at or before this time in epoch milliseconds. Defaults to current time. -
lookback
public long lookback()Only return traces where allSpan.timestamp()
are at or after (endTs - lookback) in milliseconds. Defaults to endTs. -
limit
public int limit()Maximum number of traces to return. Defaults to 10 -
annotationQueryString
Corresponds to query parameter "annotationQuery". Ex. "http.method=GET and error" -
toBuilder
-
newBuilder
-
test
Tests the supplied trace against the current request.This is used when the backend cannot fully refine a trace query.
-
toString
-