No results for

Powered byAlgolia

Configuration Parameters

The configuration parameters for sending metrics to DataDog and its EU counterpart are as follows:

providerAny APM provider name available in the supported APM provider's table.
apiKeyThe apiKey provided by DataDog.
appKeyThe appKey provided by DataDog.
regionThe region supported by DataDog. The supported regions listed below can be used in Cloud APM. Default is us.
metricsList of built-in and custom metrics to be exported.
includeDefaultMetricsIf set, the export will include the default metrics. Default is true.
resampleRateThe rate by which the metrics are resampled and sent to the APM provider in seconds. Default is 3 and acceptable values are integers between 1 and 10.
includeTestRunIdIf set, the test_run_id will be exported per each metric as an extra tag. Default is false.

As of Jan. 2021, all keys on the configuration parameters object are in camel case. So, please update your test run script(s). Also, the datadogeu provider is now set using region key.

The metrics parameter allows you to specify built-in and custom metrics to be exported to the APM provider. By default, only the basic metrics listed below are exported. These defaults also match the official k6 dashboard for Datadog, which you can read more about on visualization of metrics in Datadog.

  • data_sent
  • data_received
  • http_req_duration
  • http_reqs
  • iterations
  • vus

📖 Use case

A typical use case is to only export custom metrics defined in the script. To do that you should specify the names of your custom metrics in the metrics parameter, and set includeDefaultMetrics to false.

If you want to export metrics with more granularity, consider using a lower number for the resampleRate, like 1.

The apm key (inside ext.loadimpact) accepts a list of APM configurations (objects). Exporting metrics to APM platforms will be simultaneous and near real-time. Also, there is a 2nd pass (of metrics exports), at the end of each test run, that ensures data reliability and accuracy. Please note that the data exported in real-time may appear incorrect until the test is finished.

Example Configuration Object

All the above configuration parameters are passed like this in your test run.

export let options = {
ext: {
loadimpact: {
apm: [
provider: "datadog",
apiKey: "<Datadog Provided API key>",
appKey: "<Datadog Provided App key>",
metrics: ["http_req_sending", "my_rate", "my_gauge", ...],
includeDefaultMetrics: true,
includeTestRunId: false

Supported Regions

These are the supported regions for DataDog integration:

Geographic RegionSupported DataDog Region(s)
Rest of the worldus (default)

DataDog Setup

This guide will walk you through creating an apiKey and an appKey on Datadog. Note that the apiKey and appKey for different regions of datadog won't work on other regions.