Datadog logs Send

Datadog logs Send

Certified

Send log entries to Datadog

Sends one log entry (message) or several (logs) to the Datadog log intake. Needs the API key only.

Datadog accepts at most 1000 entries and 5 MB per request and answers before it indexes them: an entry that an index filter drops later does not make the task fail. Giving both message and logs or neither, is an error.

yaml
type: io.kestra.plugin.datadog.logs.Send

Send a log line for a pipeline step

yaml
id: datadog_log
namespace: company.observability

tasks:
  - id: send
    type: io.kestra.plugin.datadog.logs.Send
    apiKey: "{{ secret('DATADOG_API_KEY') }}"
    site: datadoghq.eu
    message: "Loaded 1250 orders"
    service: orders-pipeline
    source: kestra
    tags:
      - "env:prod"
    attributes:
      execution_id: "{{ execution.id }}"
      rows: 1250
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-datadog --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

Properties

Datadog API key

The organization API key. Use a Kestra secret, e.g. {{ secret('DATADOG_API_KEY') }}.

API base URL

Replaces https://api.<site> when set, for a proxy, a private link or a test server. Leave it empty for the public API. logs.Send does not use it: it calls the log intake, which has its own address (intakeUrl).

Datadog application key

An application key. Datadog asks for it on every call that reads data or manages monitors and downtimes, so the tasks that only send data (events.Create, metrics.Submit, logs.Send) work without it. Create it with the scopes the task needs. Use a Kestra secret, e.g. {{ secret('DATADOG_APP_KEY') }}.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Attributes

Extra attributes added to the entry as JSON fields. message, service, ddsource, hostname and ddtags are refused here because they have a property of their own. With logs, the default for the entries that do not have the attribute.

Host

The host name the entry comes from (hostname).

Log intake URL

Replaces https://http-intake.logs.<site> when set, for a proxy or a test server. apiUrl does not apply to this task: the log intake has its own address, so a proxy for the other tasks needs its own route for it.

SubTypeobject

Log entries

A list of entries in the shape of the Datadog POST /api/v2/logs body (message, ddsource, ddtags, hostname, service and any other field). Use instead of message.

Message

The text of one log entry.

Service

The service the entry belongs to, to filter on in the Log Explorer. With logs, the default for the entries that set no service.

Datadog site

The Datadog site of the organization, the domain you see in the Datadog URL: datadoghq.com (US1, the default), us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com or ddog-gov.com. A key only works on the site of the organization that created it.

Source

The source of the entry (ddsource), which picks the log pipeline in Datadog, such as kestra.

SubTypestring

Tags

Tags to attach, such as env: prod. With logs, they are added to the ddtags of every entry.

Entries sent

The number of log entries Datadog accepted.