Skip to content

@xtandard/audit/sinks/datadog

Datadog sink: datadogSink() ships events to the Logs intake API v2, chunked to the intake limits. Zero dependencies.

import { … } from "@xtandard/audit/sinks/datadog";
Name Summary
datadogSink Create a Datadog Logs sink.
defaultLogMessage The default human-readable message of an item.
toDatadogLog Map one item to a Datadog log object.
Name Summary
SinkHttpError Thrown by an HTTP-based sink when the destination answered non-2xx (or a 2xx with an error payload, e.g. Splunk’s code != 0). The stream runner records message as the cursor’s lastError and backs off.
Name Summary
DatadogSinkOptions Options for datadogSink.
Name Summary
SinkFetch The fetch shape sinks call (inject one for tests, proxies, or custom agents).
SinkHeaders Static headers, or a (possibly async) function resolved per request (rotating tokens).
Name Summary
DATADOG_MAX_BYTES Datadog intake limit: uncompressed bytes per request.
DATADOG_MAX_ENTRIES Datadog intake limit: logs per request.