Package zipkin2.finagle
Class ZipkinTracer.Builder
- java.lang.Object
-
- zipkin2.finagle.ZipkinTracer.Builder
-
- Enclosing class:
- ZipkinTracer
public static final class ZipkinTracer.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZipkinTracer
build()
ZipkinTracer.Builder
initialSampleRate(float initialSampleRate)
Percentage of traces to sample (report to zipkin) in the range [0.0 - 1.0].ZipkinTracer.Builder
localServiceName(String localServiceName)
Lower-case label of the remote node in the service graph, such as "favstar".ZipkinTracer.Builder
stats(com.twitter.finagle.stats.StatsReceiver stats)
It is possible that later versions of finagle add new types ofAnnotation
.
-
-
-
Method Detail
-
localServiceName
public ZipkinTracer.Builder localServiceName(String localServiceName)
Lower-case label of the remote node in the service graph, such as "favstar". Avoid names with variables or unique identifiers embedded.When unset, the service name is derived from
Annotation.ServiceName
which is often incorrectly set to the remote service name.This is a primary label for trace lookup and aggregation, so it should be intuitive and consistent. Many use a name from service discovery.
-
initialSampleRate
public ZipkinTracer.Builder initialSampleRate(float initialSampleRate)
Percentage of traces to sample (report to zipkin) in the range [0.0 - 1.0].Default is the value of the flag
zipkin.initialSampleRate
which if not overridden is 0.001f (0.1%).
-
stats
public ZipkinTracer.Builder stats(com.twitter.finagle.stats.StatsReceiver stats)
It is possible that later versions of finagle add new types ofAnnotation
. If this occurs, the values won't be mapped until an update occurs here. We increment a counter using below if that occurs.- Parameters:
stats
- defaults to scope "zipkin"
-
build
public ZipkinTracer build()
-
-