Class ZipkinTracer.Builder

  • Enclosing class:
    ZipkinTracer

    public static final class ZipkinTracer.Builder
    extends Object
    • 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 of Annotation. 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"