Class ExportComponentImpl
- java.lang.Object
-
- io.opencensus.trace.export.ExportComponent
-
- io.opencensus.implcore.trace.export.ExportComponentImpl
-
public final class ExportComponentImpl extends ExportComponent
Implementation of theExportComponent
.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
EXPORTER_BUFFER_SIZE
private static Duration
EXPORTER_SCHEDULE_DELAY
private InProcessRunningSpanStore
inProcessRunningSpanStore
private SampledSpanStoreImpl
sampledSpanStore
private SpanExporterImpl
spanExporter
-
Constructor Summary
Constructors Modifier Constructor Description private
ExportComponentImpl(boolean supportInProcessStores, EventQueue eventQueue)
Constructs a newExportComponentImpl
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExportComponentImpl
createWithInProcessStores(EventQueue eventQueue)
Returns a newExportComponentImpl
that has valid instances forRunningSpanStore
andSampledSpanStore
.static ExportComponentImpl
createWithoutInProcessStores(EventQueue eventQueue)
Returns a newExportComponentImpl
that hasnull
instances forRunningSpanStore
andSampledSpanStore
.InProcessRunningSpanStore
getRunningSpanStore()
Returns theRunningSpanStore
that can be used to get useful debugging information about all the current active spans.SampledSpanStoreImpl
getSampledSpanStore()
Returns theSampledSpanStore
that can be used to get useful debugging information, such as latency based sampled spans, error based sampled spans.SpanExporterImpl
getSpanExporter()
Returns theSpanExporter
which can be used to register handlers to export all the spans that are part of a distributed sampled trace (seeTraceOptions.isSampled()
).void
shutdown()
Will shutdown this ExportComponent after flushing any pending spans.-
Methods inherited from class io.opencensus.trace.export.ExportComponent
newNoopExportComponent
-
-
-
-
Field Detail
-
EXPORTER_BUFFER_SIZE
private static final int EXPORTER_BUFFER_SIZE
- See Also:
- Constant Field Values
-
EXPORTER_SCHEDULE_DELAY
private static final Duration EXPORTER_SCHEDULE_DELAY
-
spanExporter
private final SpanExporterImpl spanExporter
-
inProcessRunningSpanStore
private final InProcessRunningSpanStore inProcessRunningSpanStore
-
sampledSpanStore
private final SampledSpanStoreImpl sampledSpanStore
-
-
Constructor Detail
-
ExportComponentImpl
private ExportComponentImpl(boolean supportInProcessStores, EventQueue eventQueue)
Constructs a newExportComponentImpl
.- Parameters:
supportInProcessStores
-true
to instantiateRunningSpanStore
andSampledSpanStore
.
-
-
Method Detail
-
getSpanExporter
public SpanExporterImpl getSpanExporter()
Description copied from class:ExportComponent
Returns theSpanExporter
which can be used to register handlers to export all the spans that are part of a distributed sampled trace (seeTraceOptions.isSampled()
).- Specified by:
getSpanExporter
in classExportComponent
- Returns:
- the implementation of the
SpanExporter
or no-op if no implementation linked in the binary.
-
getRunningSpanStore
public InProcessRunningSpanStore getRunningSpanStore()
Description copied from class:ExportComponent
Returns theRunningSpanStore
that can be used to get useful debugging information about all the current active spans.- Specified by:
getRunningSpanStore
in classExportComponent
- Returns:
- the
RunningSpanStore
.
-
getSampledSpanStore
public SampledSpanStoreImpl getSampledSpanStore()
Description copied from class:ExportComponent
Returns theSampledSpanStore
that can be used to get useful debugging information, such as latency based sampled spans, error based sampled spans.- Specified by:
getSampledSpanStore
in classExportComponent
- Returns:
- the
SampledSpanStore
.
-
shutdown
public void shutdown()
Description copied from class:ExportComponent
Will shutdown this ExportComponent after flushing any pending spans.- Overrides:
shutdown
in classExportComponent
-
createWithInProcessStores
public static ExportComponentImpl createWithInProcessStores(EventQueue eventQueue)
Returns a newExportComponentImpl
that has valid instances forRunningSpanStore
andSampledSpanStore
.- Returns:
- a new
ExportComponentImpl
.
-
createWithoutInProcessStores
public static ExportComponentImpl createWithoutInProcessStores(EventQueue eventQueue)
Returns a newExportComponentImpl
that hasnull
instances forRunningSpanStore
andSampledSpanStore
.- Returns:
- a new
ExportComponentImpl
.
-
-