@grow-codes/better-stack-logs - v0.1.1
    Preparing search index...

    Class BetterStackLogExporter

    LogExporter for Better Stack's HTTP ingest API: maps records to events (toBetterStackEvent), splits batches so no request exceeds 10 MiB, encodes them as JSON, NDJSON or MessagePack, gzips when asked and posts with Authorization: Bearer <source token>. Exports are retried like idempotent calls (429, 5xx, network errors); Better Stack does not deduplicate, so an ambiguous failure may produce duplicates.

    Implements

    Index
    encoding: IngestEncoding

    Default body encoding.

    • Posts raw events (any JSON objects; dt may be a Date, an RFC 3339 string or UNIX seconds/ms/ns) as one request. Throws the mapped SDK error: 403 → AuthenticationError, 402 → RateLimitError (not retryable), 406/413 → ValidationError.

      Parameters

      Returns Promise<void>