Package io.opentelemetry.sdk.logs.export
Interface LogRecordExporter
- All Superinterfaces:
AutoCloseable,Closeable
An exporter is responsible for taking a collection of
LogRecordDatas and transmitting
them to their ultimate destination.- Since:
- 1.27.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Closes thisLogRecordExporter, releasing any resources.static LogRecordExportercomposite(LogRecordExporter... exporters) Returns aLogRecordExporterwhich delegates all exports to theexportersin order.static LogRecordExportercomposite(Iterable<LogRecordExporter> exporters) Returns aLogRecordExporterwhich delegates all exports to theexportersin order.io.opentelemetry.sdk.common.CompletableResultCodeexport(Collection<LogRecordData> logs) Exports the collections of givenLogRecordData.io.opentelemetry.sdk.common.CompletableResultCodeflush()Exports the collection ofLogRecordDatathat have not yet been exported.io.opentelemetry.sdk.common.CompletableResultCodeshutdown()Shutdown the log exporter.
-
Method Details
-
composite
Returns aLogRecordExporterwhich delegates all exports to theexportersin order.Can be used to export to multiple backends using the same
LogRecordProcessorlike aSimpleLogRecordProcessoror aBatchLogRecordProcessor. -
composite
Returns aLogRecordExporterwhich delegates all exports to theexportersin order.Can be used to export to multiple backends using the same
LogRecordProcessorlike aSimpleLogRecordProcessoror aBatchLogRecordProcessor. -
export
Exports the collections of givenLogRecordData.- Parameters:
logs- the collection ofLogRecordDatato be exported- Returns:
- the result of the export, which is often an asynchronous operation
-
flush
io.opentelemetry.sdk.common.CompletableResultCode flush()Exports the collection ofLogRecordDatathat 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 whenSdkLoggerProvider.shutdown()is called when this exporter is registered to the provider viaBatchLogRecordProcessororSimpleLogRecordProcessor.- Returns:
- a
CompletableResultCodewhich is completed when shutdown completes
-
close
default void close()Closes thisLogRecordExporter, releasing any resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-