public abstract class QueryRequest extends Object
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
QueryRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
abstract Map<String,String> |
annotationQuery()
When an input value is the empty string, include traces whose
Span.annotations()
include a value in this set, or where Span.tags() include a key is in this set. |
String |
annotationQueryString()
Corresponds to query parameter "annotationQuery".
|
abstract long |
endTs()
Only return traces where all
Span.timestamp() are at or before this time in epoch
milliseconds. |
abstract int |
limit()
Maximum number of traces to return.
|
abstract long |
lookback()
Only return traces where all
Span.timestamp() are at or after (endTs - lookback) in
milliseconds. |
abstract Long |
maxDuration()
Only return traces whose
Span.duration() is less than or equal to maxDuration
microseconds. |
abstract Long |
minDuration()
Only return traces whose
Span.duration() is greater than or equal to minDuration
microseconds. |
static QueryRequest.Builder |
newBuilder() |
abstract String |
serviceName()
When present, corresponds to
Endpoint.serviceName and constrains all other
parameters. |
abstract String |
spanName()
When present, only include traces with this
Span.name |
boolean |
test(List<Span> spans)
Tests the supplied trace against the current request.
|
abstract QueryRequest.Builder |
toBuilder() |
@Nullable public abstract String serviceName()
Endpoint.serviceName and constrains all other
parameters.@Nullable public abstract String spanName()
Span.namepublic abstract Map<String,String> annotationQuery()
Span.annotations()
include a value in this set, or where Span.tags() include a key is in this set. When
not, include traces whose Span.tags() an entry in this map.
Multiple entries are combined with AND, and AND against other conditions.
@Nullable public abstract Long minDuration()
Span.duration() is greater than or equal to minDuration
microseconds.@Nullable public abstract Long maxDuration()
Span.duration() is less than or equal to maxDuration
microseconds. Only valid with minDuration().public abstract long endTs()
Span.timestamp() are at or before this time in epoch
milliseconds. Defaults to current time.public abstract long lookback()
Span.timestamp() are at or after (endTs - lookback) in
milliseconds. Defaults to endTs.public abstract int limit()
@Nullable public String annotationQueryString()
public abstract QueryRequest.Builder toBuilder()
public static QueryRequest.Builder newBuilder()
Copyright © 2015–2018 OpenZipkin. All rights reserved.