Class BatchSpanProcessor.Worker
- java.lang.Object
-
- io.opentelemetry.sdk.trace.export.BatchSpanProcessor.Worker
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- BatchSpanProcessor
private static final class BatchSpanProcessor.Worker extends java.lang.Object implements java.lang.Runnable
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<SpanData>
batch
private boolean
continueWork
private Attributes
droppedAttrs
private Attributes
exportedAttrs
private long
exporterTimeoutNanos
private java.util.concurrent.atomic.AtomicReference<CompletableResultCode>
flushRequested
private int
maxExportBatchSize
private long
nextExportTime
private LongCounter
processedSpansCounter
private java.util.Queue<ReadableSpan>
queue
private long
scheduleDelayNanos
private java.util.concurrent.BlockingQueue<java.lang.Boolean>
signal
private SpanExporter
spanExporter
private java.util.concurrent.atomic.AtomicInteger
spansNeeded
-
Constructor Summary
Constructors Modifier Constructor Description private
Worker(SpanExporter spanExporter, MeterProvider meterProvider, long scheduleDelayNanos, int maxExportBatchSize, long exporterTimeoutNanos, java.util.Queue<ReadableSpan> queue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addSpan(ReadableSpan span)
private void
exportCurrentBatch()
private void
flush()
private CompletableResultCode
forceFlush()
void
run()
private CompletableResultCode
shutdown()
private void
updateNextExportTime()
-
-
-
Field Detail
-
processedSpansCounter
private final LongCounter processedSpansCounter
-
droppedAttrs
private final Attributes droppedAttrs
-
exportedAttrs
private final Attributes exportedAttrs
-
spanExporter
private final SpanExporter spanExporter
-
scheduleDelayNanos
private final long scheduleDelayNanos
-
maxExportBatchSize
private final int maxExportBatchSize
-
exporterTimeoutNanos
private final long exporterTimeoutNanos
-
nextExportTime
private long nextExportTime
-
queue
private final java.util.Queue<ReadableSpan> queue
-
spansNeeded
private final java.util.concurrent.atomic.AtomicInteger spansNeeded
-
signal
private final java.util.concurrent.BlockingQueue<java.lang.Boolean> signal
-
flushRequested
private final java.util.concurrent.atomic.AtomicReference<CompletableResultCode> flushRequested
-
continueWork
private volatile boolean continueWork
-
batch
private final java.util.ArrayList<SpanData> batch
-
-
Constructor Detail
-
Worker
private Worker(SpanExporter spanExporter, MeterProvider meterProvider, long scheduleDelayNanos, int maxExportBatchSize, long exporterTimeoutNanos, java.util.Queue<ReadableSpan> queue)
-
-
Method Detail
-
addSpan
private void addSpan(ReadableSpan span)
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
flush
private void flush()
-
updateNextExportTime
private void updateNextExportTime()
-
shutdown
private CompletableResultCode shutdown()
-
forceFlush
private CompletableResultCode forceFlush()
-
exportCurrentBatch
private void exportCurrentBatch()
-
-