Package io.opentelemetry.sdk.logs.export
Interface LogExporter
- All Known Implementing Classes:
InMemoryLogExporter
public interface LogExporter
An exporter is responsible for taking a collection of
LogDatas and transmitting them to
their ultimate destination.-
Method Summary
Modifier and TypeMethodDescriptionstatic LogExportercomposite(LogExporter... exporters) Returns aLogExporterwhich delegates all exports to theexportersin order.static LogExportercomposite(Iterable<LogExporter> exporters) Returns aLogExporterwhich delegates all exports to theexportersin order.io.opentelemetry.sdk.common.CompletableResultCodeexport(Collection<LogData> logs) Exports the collections of givenLogData.io.opentelemetry.sdk.common.CompletableResultCodeflush()Exports the collection ofLogDatathat have not yet been exported.io.opentelemetry.sdk.common.CompletableResultCodeshutdown()Shutdown the log exporter.
-
Method Details
-
composite
Returns aLogExporterwhich delegates all exports to theexportersin order.Can be used to export to multiple backends using the same
LogProcessorlike aSimpleLogProcessoror aBatchLogProcessor. -
composite
Returns aLogExporterwhich delegates all exports to theexportersin order.Can be used to export to multiple backends using the same
LogProcessorlike aSimpleLogProcessoror aBatchLogProcessor. -
export
Exports the collections of givenLogData.- Parameters:
logs- the collection ofLogDatato be exported- Returns:
- the result of the export, which is often an asynchronous operation
-
flush
io.opentelemetry.sdk.common.CompletableResultCode flush()Exports the collection ofLogDatathat have not yet been exported.- Returns:
- the result of the flush, which is often an asynchronous operation
-
shutdown
io.opentelemetry.sdk.common.CompletableResultCode shutdown()Shutdown the log exporter. Called whenSdkLogEmitterProvider.shutdown()is called when this exporter is registered to the provider viaBatchLogProcessororSimpleLogProcessor.- Returns:
- a
CompletableResultCodewhich is completed when shutdown completes
-