Interface LogExporter
- All Known Implementing Classes:
BetterStackLogExporter,BetterStackOtlpLogExporter,InMemoryLogExporter
public interface LogExporter
Sends batches of log records to the service. A service package implements this on top of its
ingest API; the
BatchProcessor calls it from a single background thread, never
concurrently.-
Method Summary
Modifier and TypeMethodDescriptionexport(List<LogRecord> records, ExportOptions options) Exports a batch.shutdown()Releases resources.
-
Method Details
-
export
Exports a batch. The future completes with the accepted/rejected counts; it may also complete exceptionally (treated as "all rejected"). Cancelling the future cancels the export.- Parameters:
records- records to send (never empty)options- gzip flag and time budget- Returns:
- the export result
-
shutdown
CompletableFuture<Void> shutdown()Releases resources. Called once byBatchProcessor.shutdown.- Returns:
- completes when the exporter is closed
-