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

    Class BetterStackOtlpLogExporter

    LogExporter that sends OTLP/HTTP logs to the source's ingesting host (POST {url}/v1/logs) with the source token. Records are grouped by resource; batches are split so no request exceeds maxRequestBytes. partial_success in the response counts as rejected records. Retried like idempotent calls (duplicates possible after an ambiguous failure).

    Implements

    Index
    protocol: OtlpProtocol

    Payload format.

    • Splits records into chunks whose encoded size stays under the request limit.

      Parameters

      Returns { chunks: LogRecord[][]; oversized: number }

    • Encodes records as one request body (protobuf bytes or OTLP JSON text).

      Parameters

      Returns Uint8Array

    • Posts one OTLP request for records. Returns the partial success (rejected count) when the service reports one. Throws the mapped SDK error.

      Parameters

      • records: readonly LogRecord[]
      • options: { gzip?: boolean; signal?: AbortSignal } = {}

      Returns Promise<OtlpPartialSuccess | undefined>