Send CI job logs
Send log lines for a CI job over HTTP. See the CI Visibility Pipelines API for submitting the associated pipeline and job events.
A request can contain one log object or an array of up to 1,000 log objects. The maximum uncompressed request body size is 5.1 MiB.
You can stream log lines while a CI job runs or send them after it finishes. After you submit the completed job event, 20 seconds without a new log line marks the job's logs as complete. Lines sent after that may not appear.
A job can have up to 128 additional attributes and 256 tags. Additional attributes are top-level fields with string, number, Boolean, or null values. Nested objects and arrays are rejected. Additional attributes and ddtags apply to all log lines in the job. If an additional attribute has different values on different lines, the first value received is used. Tags supplied on different lines are combined. A job can contain up to 2,000,000 log records or 1 GiB of message bytes in total.
To reduce request size, send gzip-compressed JSON with the Content-Encoding: gzip header. Retry requests after a 408, 429, 500, or 503 response.
Request
- Base URLhttps://http-intake.logs.datadoghq.com
- AuthAPI key in header DD-API-KEY
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
HTTP header used to compress the JSON request body.
Request body
Example request
[
{
"ddtags": "runner:linux,architecture:amd64",
"job_id": "job-456",
"line_number": 812,
"message": "Running go test ./...",
"pipeline_unique_id": "3eacb6f3-ff04-4e10-8a9c-46e6d054024a",
"provider_name": "example-provider",
"section_name": "tests",
"status": "warn"
}
]Response
Request accepted for processing
Changes
Changes to this operation have not been checked yet.