Docs
Plugin HubCategoriesObservabilityDatadogConfiguration

Datadog Configuration

Configuration reference for the Datadog plugin (`datadog`): the parameters and plugin metadata, each attribute with its type, whether it is required, its default and its accepted values.

Parameters

See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.

prefer_name — boolean · optional · default: true · since APISIX 2.11.0 · API7 Gateway 3.2.14.1

If true, export route/service name instead of their ID in metric tags.

include_path — boolean · optional · default: false · since APISIX 3.14.0 · API7 Gateway 3.9.0

If true, include the path pattern in metric tags. This option is available in APISIX but not yet supported in API7 Enterprise.

include_method — boolean · optional · default: false · since APISIX 3.14.0 · API7 Gateway 3.9.0

If true, include the HTTP method in metric tags. This option is available in APISIX but not yet supported in API7 Enterprise.

constant_tags — array[string] · optional · since APISIX 3.14.0 · API7 Gateway 3.9.0

Static key-value tags that are attached to all metrics. These tags can be used to add metadata such as team ownership or environment, enabling easier filtering, aggregation, and alerting across related endpoints. Available in APISIX from version 3.14.0 and API7 Enterprise from version 3.9.0.

name — string · optional · default: datadog · since APISIX 2.11.0 · API7 Gateway 3.8.6

Unique identifier of the plugin for the batch processor. If you use Prometheus to monitor APISIX metrics, the name is exported in apisix_batch_process_entries.

batch_max_size — integer · optional · default: 1000 · since APISIX 2.11.0 · API7 Gateway 3.8.6

Valid values: greater than 0

The number of log entries allowed in one batch. Once reached, the batch will be sent to Datadog agent. Setting this parameter to 1 means immediate processing.

inactive_timeout — integer · optional · default: 5 · since APISIX 2.11.0 · API7 Gateway 3.8.6

Valid values: greater than 0

The maximum time in seconds to wait for new logs before sending the batch to the logging service. The value should be smaller than buffer_duration.

buffer_duration — integer · optional · default: 60 · since APISIX 2.11.0 · API7 Gateway 3.8.6

Valid values: greater than 0

The maximum time in seconds from the earliest entry allowed before sending the batch to the logging service.

retry_delay — integer · optional · default: 1 · since APISIX 2.11.0 · API7 Gateway 3.8.6

Valid values: greater than or equal to 0

The time interval in seconds to retry sending the batch to the logging service if the batch was not successfully sent.

max_retry_count — integer · optional · default: 0 · since APISIX 2.11.0 · API7 Gateway 3.8.6

Valid values: greater than or equal to 0

The maximum number of unsuccessful retries allowed before dropping the log entries.

Plugin Metadata

host — string · optional · default: 127.0.0.1 · since APISIX 2.11.0 · API7 Gateway 3.2.14.1

DogStatsD server host address.

port — integer · optional · default: 8125 · since APISIX 2.11.0 · API7 Gateway 3.2.14.1

DogStatsD server port.

namespace — string · optional · default: apisix · since APISIX 2.11.0 · API7 Gateway 3.2.14.1

Prefix for all metrics. For example, if the namespace is configured as apisix, you should see the request.counter metric exported as apisix.request.counter to Datadog.

constant_tags — array[string] · optional · default: [source:apisix] · since APISIX 2.11.0 · API7 Gateway 3.2.14.1

Metric tags.

max_pending_entries — integer · optional · default: 8192 in APISIX 3.18.0 and in API7 Enterprise 3.9.19 and 3.10.6

Valid values: greater than or equal to 1

Maximum number of entries waiting in the batch processor. New entries are discarded when the backlog reaches the limit.

Introduced in API7 Enterprise 3.9.19 on the 3.9 line and 3.10.6 on the 3.10 line, and in APISIX 3.18.0.

See Batch Processor (opens in Apache APISIX docs) for sizing and verification guidance.