Send job logs to your OpenTelemetry collector
Buildkite Agent v3.135.0 can now send job logs to your OpenTelemetry collector. This brings CI output into the same observability backend as your application and infrastructure telemetry, making it easier to investigate slow or failing jobs without switching between tools.
When OpenTelemetry tracing is also enabled, each record is correlated with the job, phase, or hook span that produced it. In backends that support log-to-trace correlation, you can pivot from a span directly to the output that explains what happened. Tracing is optional — logs can also be exported on their own.
Enable the new OTLP log sink with --job-logs-otlp or BUILDKITE_JOB_LOGS_OTLP=true on buildkite-agent start. Your normal Buildkite job log stream is unchanged.
The agent uses the standard OTEL_EXPORTER_OTLP_LOGS_* and OTEL_EXPORTER_OTLP_* environment variables, so you can use the same collector configuration as your trace export. Both grpc (the default) and http/protobuf are supported through OTEL_EXPORTER_OTLP_LOGS_PROTOCOL.
Each log record carries:
- Body: one line from the job log stream, with the same
[REDACTED]markers as the Buildkite UI and downloadable job log, including command output and agent output such as section headers, prompts, and warnings - Trace correlation: the trace and span ID of the enclosing phase or hook span, falling back to the root job span when no phase is active. Records are uncorrelated when tracing is disabled
- Job attributes: organization slug, pipeline slug, branch, queue, agent name and ID, build ID and number, job ID, label, and step key
- Timestamp: the arrival of the line's first byte, matching the start-of-line semantics of the Buildkite job log timestamper
Agent operators opt in to job log export when starting the agent.
For configuration details and the complete record schema, see Exporting job logs as OpenTelemetry logs.
Ming
Start turning complexity into an advantage
Create an account to get started for free.