Package codes.grow.packages.zipkin
Class ZipkinTraceQuery.Builder
java.lang.Object
codes.grow.packages.zipkin.ZipkinTraceQuery.Builder
- Enclosing class:
ZipkinTraceQuery
Builder of a
ZipkinTraceQuery (validated by ZipkinQueryClient.getTraces()).-
Method Summary
Modifier and TypeMethodDescriptionannotation(String term) Adds a bare term: a tag key or an annotation value (error,cache.miss).annotationQuery(String annotationQuery) Raw annotation query.build()Builds the query.End of the window.limit(int limit) Maximum number of traces.Window length beforeendTs.maxDurationMicros(long micros) Maximum span duration (needs a minimum).minDurationMicros(long micros) Minimum span duration.remoteServiceName(String remoteServiceName) Remote service name.serviceName(String serviceName) Local service name.Span name.Adds an exact tag match.Adds exact tag matches (seetag(java.lang.String, java.lang.String)).
-
Method Details
-
serviceName
Local service name.- Parameters:
serviceName- name- Returns:
- this
-
remoteServiceName
Remote service name.- Parameters:
remoteServiceName- name- Returns:
- this
-
spanName
Span name.- Parameters:
spanName- name- Returns:
- this
-
annotationQuery
Raw annotation query.- Parameters:
annotationQuery- query such ashttp.method=GET and error- Returns:
- this
-
tag
Adds an exact tag match. A key or value containing" and "(or a key containing=) cannot be expressed in Zipkin's syntax: that term is matched client-side after the query (so fewer thanlimittraces may come back).- Parameters:
key- tag keyvalue- tag value- Returns:
- this
-
tags
Adds exact tag matches (seetag(java.lang.String, java.lang.String)).- Parameters:
tags- tags- Returns:
- this
-
annotation
Adds a bare term: a tag key or an annotation value (error,cache.miss).- Parameters:
term- term- Returns:
- this
-
minDurationMicros
Minimum span duration.- Parameters:
micros- microseconds- Returns:
- this
-
maxDurationMicros
Maximum span duration (needs a minimum).- Parameters:
micros- microseconds- Returns:
- this
-
endTs
End of the window.- Parameters:
endTs- instant- Returns:
- this
-
lookback
Window length beforeendTs.- Parameters:
lookback- positive duration- Returns:
- this
-
limit
Maximum number of traces.- Parameters:
limit- positive limit- Returns:
- this
-
build
Builds the query.- Returns:
- query
-