Class SimpleSpanProcessorBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.trace.export.SimpleSpanProcessorBuilder
-
public final class SimpleSpanProcessorBuilder extends java.lang.ObjectBuilder class forSimpleSpanProcessor.- Since:
- 1.34.0
-
-
Field Summary
Fields Modifier and Type Field Description private booleanexportUnsampledSpansprivate SpanExporterspanExporter
-
Constructor Summary
Constructors Constructor Description SimpleSpanProcessorBuilder(SpanExporter spanExporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleSpanProcessorbuild()Returns a newSimpleSpanProcessorwith the configuration of this builder.SimpleSpanProcessorBuildersetExportUnsampledSpans(boolean exportUnsampledSpans)Sets whether unsampled spans should be exported.
-
-
-
Field Detail
-
spanExporter
private final SpanExporter spanExporter
-
exportUnsampledSpans
private boolean exportUnsampledSpans
-
-
Constructor Detail
-
SimpleSpanProcessorBuilder
SimpleSpanProcessorBuilder(SpanExporter spanExporter)
-
-
Method Detail
-
setExportUnsampledSpans
public SimpleSpanProcessorBuilder setExportUnsampledSpans(boolean exportUnsampledSpans)
Sets whether unsampled spans should be exported. If unset, defaults to exporting only sampled spans.
-
build
public SimpleSpanProcessor build()
Returns a newSimpleSpanProcessorwith the configuration of this builder.- Returns:
- a new
SimpleSpanProcessor.
-
-