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
- Create and verify a Datadog connection in the Integration Account Console.
- Add Datadog to the workflow and select that account in the module's Connection control.
- Select an operation. For time series, map the start and end of the observation window as Unix seconds and supply a Datadog metrics query.
- Check the result status and whether data was returned before using the measurements in a downstream step.
Inputs
| Input | Type | Required for | Purpose |
|---|---|---|---|
operation | string | All operations | Select list_active_metrics, get_metric_metadata, or query_timeseries. |
fromEpochSeconds | integer | List, query | Positive Unix timestamp in seconds. The list covers activity from this time to the present. |
toEpochSeconds | integer | Query | Positive Unix timestamp in seconds, later than the start by no more than 31 days. |
metricName | string | Metadata | Exact Datadog metric name, up to 200 characters. Start with a letter and use only ASCII letters, digits, dots, or underscores. |
query | string | Query | Datadog metrics query, up to 2,048 characters. |
Outputs
| Output | Type | When present | Meaning |
|---|---|---|---|
status | string | Always | success or error. |
operation | string | When known | Normalized operation name. |
attempts | integer | Always | Number of provider request attempts. |
httpStatus | integer | Provider responded | HTTP status returned by Datadog. |
items, count | array, integer | List or query succeeds | Metric names for a list, or series objects for a query, with the number returned. |
data | object | Metadata succeeds | Available type, description, shortName, unit, perUnit, integration, and statsdInterval properties. |
error | object | Failure | Safe 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.
| Sites | Allowed site values |
|---|---|
| US1, US3, US5 | datadoghq.com (default), us3.datadoghq.com, us5.datadoghq.com |
| EU1, UK1 | datadoghq.eu, uk1.datadoghq.com |
| AP1, AP2 | ap1.datadoghq.com, ap2.datadoghq.com |
| US1-FED, US2-FED | ddog-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
| Operation | Datadog request | Typical use |
|---|---|---|
list_active_metrics | GET /api/v1/metrics?from=... | Check whether known metrics have reported since a rollout or instrumentation change. |
get_metric_metadata | GET /api/v1/metrics/{metric_name} | Check the unit, type, or available reporting metadata before applying a threshold. |
query_timeseries | GET /api/v1/query | Retrieve 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.