Skip to main content
Send logs to Datadog Log Management. Logs arrive with service and source facets, the level mapped to Datadog’s status, and the full meta object as searchable attributes.

Setup

  1. Create an API key in Organization Settings → API Keys.
  2. Set the environment variables:
  1. Wire the transport:
  1. Trigger a request and open Logs → Explorer in Datadog.

Environment Variables

Options

Plus the shared batching options: maxBatchSize, flushIntervalMs, timeout, retries — see the overview.

Payload

Logs post to https://http-intake.logs.{site}/api/v2/logs:
  • status — the log level lowercased (info, warning, error), which Datadog’s default status remapper picks up for severity coloring.
  • http.status_code — the HTTP response status from access logs, following Datadog’s standard attribute so response-code facets work out of the box.
  • Attributes — the full meta object rides along nested (request.method, context.requestId, durationMs, …), searchable with @request.method:GET style queries.

Troubleshooting

  • 403 — the API key is invalid, or it belongs to a different site than DD_SITE; keys are region-scoped.
  • Wrong region — EU organizations must set DD_SITE=datadoghq.eu; a wrong site surfaces as a non-2xx response through the onError hook or stderr.
  • Levels look wrong — if you customized the status remapper in a log pipeline, map it to the status attribute.