Class BetterStackLogExporter

java.lang.Object
codes.grow.packages.betterstack.BetterStackLogExporter
All Implemented Interfaces:
LogExporter

public final class BetterStackLogExporter extends Object implements LogExporter
LogExporter for Better Stack's HTTP ingest API (POST {url}/ on the source's ingesting host, Authorization: Bearer <source token>).

Records are mapped with BetterStackEvents.toEvent(codes.grow.packages.betterstack.logging.LogRecord), split so that no request exceeds maxRequestBytes (10 MiB), encoded as JSON, NDJSON or MessagePack and gzip-compressed when the export asks for it. A record larger than maxRecordBytes is rejected with a ValidationException before anything is sent. Exports are retried like idempotent calls (429, 5xx, network errors); Better Stack does not deduplicate, so a retry after a lost answer can store a record twice. Get one from BetterStackClient.exporter() or BetterStackClient.newExporter(BetterStackLogExporterOptions).