Skip to main content

Datadog ExecModule

Overview​

DatadogModule reads metrics from Datadog's v1 Metrics API. Use it to confirm that a signal is reporting, check its unit and type, or collect measurements for a specific time window. An incident workflow can pass that evidence to a branch or an on-call summary. A deployment workflow can use the same query for comparable windows before and after a release.

Usage​

  1. Create and verify a Datadog connection in the Integration Account Console.
  2. Add Datadog to the workflow and select that account in the module's Connection control.
  3. Select an operation. For time series, map the start and end of the observation window as Unix seconds and supply a Datadog metrics query.
  4. Check the result status and whether data was returned before using the measurements in a downstream step.

Inputs​

InputTypeRequired forPurpose
operationstringAll operationsSelect list_active_metrics, get_metric_metadata, or query_timeseries.
fromEpochSecondsintegerList, queryPositive Unix timestamp in seconds. The list covers activity from this time to the present.
toEpochSecondsintegerQueryPositive Unix timestamp in seconds, later than the start by no more than 31 days.
metricNamestringMetadataExact Datadog metric name, up to 200 characters. Start with a letter and use only ASCII letters, digits, dots, or underscores.
querystringQueryDatadog metrics query, up to 2,048 characters.

Outputs​

OutputTypeWhen presentMeaning
statusstringAlwayssuccess or error.
operationstringWhen knownNormalized operation name.
attemptsintegerAlwaysNumber of provider request attempts.
httpStatusintegerProvider respondedHTTP status returned by Datadog.
items, countarray, integerList or query succeedsMetric names for a list, or series objects for a query, with the number returned.
dataobjectMetadata succeedsAvailable type, description, shortName, unit, perUnit, integration, and statsdInterval properties.
errorobjectFailureSafe code, message, and retryable fields, with httpStatus when available.

In a query result, pointlist entries contain a Unix timestamp in milliseconds and a measurement. The request bounds use seconds. Grouping can produce several series from one query. Check for empty series and missing measurements before interpreting results.

IntegrationAccount Requirements​

Bind a Datadog IntegrationAccount with status READY through the datadogAccount control. Store the 32-character hexadecimal Datadog API key in the protected apiKey field and the 40-character hexadecimal application key in the protected password field. Both keys must belong to the organization at the selected site. Use a dedicated identity and scope the application key to metrics_read for discovery and metadata, or timeseries_query for queries. Grant both permissions only when the workflow needs both. Create and rotate the keys through the account connection. Datadog API and application keys

Configuration​

Set the operation in the module configuration. A mapped operation is used only when the configuration has no operation. Mapped timestamps, metric names, and queries override their saved values, so a workflow can supply a dynamic observation window. The Datadog site and requestMaxAttempts come from saved module configuration. Enter the site's domain without a scheme, path, or port.

SitesAllowed site values
US1, US3, US5datadoghq.com (default), us3.datadoghq.com, us5.datadoghq.com
EU1, UK1datadoghq.eu, uk1.datadoghq.com
AP1, AP2ap1.datadoghq.com, ap2.datadoghq.com
US1-FED, US2-FEDddog-gov.com, us2.ddog-gov.com

The module sends credentials to the fixed Datadog HTTPS API for the selected site, subject to the platform's outbound network policy. The client does not follow redirects. Keep queries scoped to the service and environment relevant to the decision. Route metric names, tags, and measurements only to destinations approved for that data. Datadog sites

Operations​

OperationDatadog requestTypical use
list_active_metricsGET /api/v1/metrics?from=...Check whether known metrics have reported since a rollout or instrumentation change.
get_metric_metadataGET /api/v1/metrics/{metric_name}Check the unit, type, or available reporting metadata before applying a threshold.
query_timeseriesGET /api/v1/queryRetrieve measurements for a bounded window to use in a deployment check or incident summary.

Errors and Failure Modes​

Invalid inputs and unsupported sites fail before the module calls Datadog. If Datadog rejects access, verify that both keys belong to the selected site and that the application key has the operation's permission. An unknown metric can produce HTTP 404. An empty successful query indicates that no datapoints matched the window and tags. Give that result its own path in downstream branching.

Throttling and eligible transient failures can retry with bounded backoff. Set requestMaxAttempts to one to three total attempts. The default is three. When the provider sends a supported retry delay of more than five seconds, the module returns a retryable error for the workflow to handle. Each request attempt has a 15-second timeout. Responses above 5 MiB fail the request. For a large query, narrow the time window or reduce the number of groups. Provider error bodies and account credentials are excluded from error results.

Example​

A release workflow checks the duration of checkout requests over a 15-minute window after a rollout. The application already reports checkout.request.duration with the environment tag shown here. Replace the timestamps with the actual observation window.

{
"operation": "query_timeseries",
"fromEpochSeconds": 1794009600,
"toEpochSeconds": 1794010500,
"query": "avg:checkout.request.duration{env:production}"
}

When the metric has reported, a successful result can include this selected output:

{
"status": "success",
"operation": "query_timeseries",
"count": 1,
"items": [
{
"metric": "checkout.request.duration",
"pointlist": [[1794009600000, 182.5], [1794009660000, 195.1]]
}
]
}

Check the metric's unit before comparing values with a service threshold. Run the same query over a comparable window before the deployment to give reviewers a baseline.

Notes​

  • Pagination. The three v1 endpoints return one response per request. The active-metric list has no continuation cursor.
  • Rate limits. Requests and retries count toward the Datadog site's API limits. Avoid high-frequency full inventories and large groups of concurrent requests.
  • API limits. Datadog may aggregate datapoints across longer windows. The connector covers the three listed v1 reads. Datadog v2 queries, metric submission, monitor administration, and tag configuration are outside this operation set.
  • Idempotency and destructive behavior. All operations read metrics without changing Datadog resources. Repeated reads can reflect late datapoints or a newly active metric.

See Datadog's API references for active metric discovery, metric metadata, and time-series queries.