Class SimpleSpanProcessorBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.trace.export.SimpleSpanProcessorBuilder
-
public final class SimpleSpanProcessorBuilder extends java.lang.Object
Builder class forSimpleSpanProcessor
.- Since:
- 1.34.0
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
exportUnsampledSpans
private SpanExporter
spanExporter
-
Constructor Summary
Constructors Constructor Description SimpleSpanProcessorBuilder(SpanExporter spanExporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleSpanProcessor
build()
Returns a newSimpleSpanProcessor
with the configuration of this builder.SimpleSpanProcessorBuilder
setExportUnsampledSpans(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 newSimpleSpanProcessor
with the configuration of this builder.- Returns:
- a new
SimpleSpanProcessor
.
-
-