Class AsyncZipkinSpanHandler.Builder
- Enclosing class:
- AsyncZipkinSpanHandler
public static final class AsyncZipkinSpanHandler.Builder extends ZipkinSpanHandler.Builder
- Since:
- 2.14
-
Method Summary
Modifier and Type Method Description AsyncZipkinSpanHandler.BuilderalwaysReportSpans(boolean alwaysReportSpans)When true, all spanssampled locallyare reported to the span reporter, even if they aren't sampled remotely.AsyncZipkinSpanHandlerbuild()AsyncZipkinSpanHandler.BuildercloseTimeout(long timeout, TimeUnit unit)AsyncZipkinSpanHandler.BuildererrorTag(brave.Tag<Throwable> errorTag)Sets the "error" tag when absent andMutableSpan.error()is present.AsyncZipkinSpanHandler.BuildermessageMaxBytes(int messageMaxBytes)AsyncZipkinSpanHandler.BuildermessageTimeout(long timeout, TimeUnit unit)AsyncZipkinSpanHandler.Buildermetrics(ReporterMetrics metrics)AsyncZipkinSpanHandler.BuilderqueuedMaxBytes(int queuedMaxBytes)AsyncZipkinSpanHandler.BuilderqueuedMaxSpans(int queuedMaxSpans)AsyncZipkinSpanHandler.BuilderthreadFactory(ThreadFactory threadFactory)
-
Method Details
-
threadFactory
- Since:
- 2.14
- See Also:
AsyncReporter.Builder.threadFactory(ThreadFactory)
-
metrics
- Since:
- 2.14
- See Also:
AsyncReporter.Builder.metrics(ReporterMetrics)
-
messageMaxBytes
- Since:
- 2.14
- See Also:
AsyncReporter.Builder.messageMaxBytes(int)
-
messageTimeout
- Since:
- 2.14
- See Also:
AsyncReporter.Builder.messageTimeout(long, TimeUnit)
-
closeTimeout
- Since:
- 2.14
- See Also:
AsyncReporter.Builder.closeTimeout(long, TimeUnit)
-
queuedMaxSpans
- Since:
- 2.14
- See Also:
AsyncReporter.Builder.queuedMaxSpans(int)
-
queuedMaxBytes
- Since:
- 2.14
- See Also:
AsyncReporter.Builder.queuedMaxBytes(int)
-
errorTag
Description copied from class:ZipkinSpanHandler.BuilderSets the "error" tag when absent andMutableSpan.error()is present.Note: Zipkin format uses the "error" tag, but alternative formats may have a different tag name or a field entirely. Hence, we only create the "error" tag here, and only if not previously set.
- Overrides:
errorTagin classZipkinSpanHandler.Builder
-
alwaysReportSpans
Description copied from class:ZipkinSpanHandler.BuilderWhen true, all spanssampled locallyare reported to the span reporter, even if they aren't sampled remotely. Defaults tofalse.The primary use case is to implement a sampling overlay, such as boosting the sample rate for a subset of the network depending on the value of a baggage field. This means that data will report when either the trace is normally sampled, or secondarily sampled via a custom header.
This is simpler than a custom
SpanHandler, because you don't have to duplicate transport mechanics already implemented in thespan reporter. However, this assumes your backend can properly process the partial traces implied when using conditional sampling. For example, if your sampling condition is not consistent on a call tree, the resulting data could appear broken.- Overrides:
alwaysReportSpansin classZipkinSpanHandler.Builder- See Also:
SamplingFlags.sampledLocal()
-
build
- Specified by:
buildin classZipkinSpanHandler.Builder
-