public final class Tracing extends Object
Beeline
(make sure to read its class Javadoc first), SpanBuilderFactory
, and Tracer
.
SpanBuilderFactory helps with the construction of Span instances, while Tracer provides an API to manage Spans within its thread-local context. The Beeline class is a convenient façade to both.
For more details, see the Javadoc of each class.
Modifier and Type | Method | Description |
---|---|---|
static Beeline |
createBeeline(Tracer tracer,
SpanBuilderFactory factory) |
Creates a
Beeline serves as the main point of interaction with traces in a Beeline-instrumented
application. |
static SpanBuilderFactory |
createSpanBuilderFactory(SpanPostProcessor processor,
TraceSampler<? super String> globalSampler) |
Creates a
SpanBuilderFactory that helps with the construction of Span instances and configures them with
the provided client and sampler, as well as default implementation of
ClockProvider and TraceIdProvider . |
static SpanPostProcessor |
createSpanProcessor(io.honeycomb.libhoney.HoneyClient client,
TraceSampler<? super Span> samplingHook) |
Creates a
SpanPostProcessor that performs post-processing of Spans. |
static Tracer |
createTracer(SpanBuilderFactory factory) |
Factory method to create a new
Tracer instance,
which helps manage tracing instrumentation and reports spans to Honeycomb using the provided client. |
static Tracer |
createTracer(SpanBuilderFactory factory,
TracingContext context) |
Factory method to create a new
Tracer instance,
which helps manage tracing instrumentation and reports spans to Honeycomb using the provided client. |
public static Beeline createBeeline(Tracer tracer, SpanBuilderFactory factory)
Beeline
serves as the main point of interaction with traces in a Beeline-instrumented
application.tracer
- to use to manage the Spans within its thread-local context.factory
- used to create Builders of Spans.public static Tracer createTracer(SpanBuilderFactory factory)
Tracer
instance,
which helps manage tracing instrumentation and reports spans to Honeycomb using the provided client.
See the Tracer's javadoc for details.factory
- used to create Builders of Spans.createSpanBuilderFactory(SpanPostProcessor, TraceSampler)
public static Tracer createTracer(SpanBuilderFactory factory, TracingContext context)
Tracer
instance,
which helps manage tracing instrumentation and reports spans to Honeycomb using the provided client.
See the Tracer's javadoc for details.factory
- used to create Builders of Spans.context
- TracingContext
instance to use to tracking spans associated with a requestcreateSpanBuilderFactory(SpanPostProcessor, TraceSampler)
public static SpanBuilderFactory createSpanBuilderFactory(SpanPostProcessor processor, TraceSampler<? super String> globalSampler)
SpanBuilderFactory
that helps with the construction of Span instances and configures them with
the provided client and sampler, as well as default implementation of
ClockProvider
and TraceIdProvider
.processor
- to use to send spans.globalSampler
- to use when deciding whether a constructed Span will be sampled.public static SpanPostProcessor createSpanProcessor(io.honeycomb.libhoney.HoneyClient client, TraceSampler<? super Span> samplingHook)
SpanPostProcessor
that performs post-processing of Spans. It can apply additional sampling
based on the contents of a Span, and it converts Span
instances into Event
that can be sent to Honeycomb.client
- to use to send events that it generates.samplingHook
- to use when deciding whether to sample a Span.Copyright © 2019–2020 Honeycomb. All rights reserved.