Configuration
Properties
Must be
"datadog".Datadog API key. Supports Go templates (e.g.,
{{.variables.dd_api_key}}).Datadog Application key. Supports Go templates. Use the actual key value, NOT
the Key ID.
Named queries map. Keys become accessible as
result.queries.<name> in success conditions.
Values support Go templates for dynamic filtering.Formula to combine query results. Reference queries by their key names (e.g.,
"a / b * 100").Aggregation method. Options:
last, avg, min, max, sum, mean,
percentile, l2norm, area.Time window in seconds for the query. Determines how far back to look for
metric data.
Datadog site URL. Options:
datadoghq.com, datadoghq.eu,
us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com.Aggregator Options
Theaggregator property specifies how to aggregate metric values:
last(default) - Most recent valueavg- Average valuemin- Minimum valuemax- Maximum valuesum- Sum of valuesmean- Mean valuepercentile- Percentile valuel2norm- L2 normarea- Area under the curve
Supported Sites
datadoghq.com(US1 - default)datadoghq.eu(EU)us3.datadoghq.com(US3)us5.datadoghq.com(US5)ap1.datadoghq.com(AP1)
Response Data Available in CEL
The Datadog provider makes the following data available in your CEL success conditions:| Field | Type | Description |
|---|---|---|
result.ok | boolean | true if API call succeeded (2xx status) |
result.statusCode | integer | HTTP status code from Datadog API |
result.queries.<name> | float64 (or null) | Value for each named query |
result.json | object | Full Datadog API response |
result.body | string | Raw response body |
result.duration | integer | Request duration in milliseconds |
Accessing Query Values
Since queries are named, you access them by name in your success condition:Example Configurations
Single Query
Multiple Queries with Formula
Use multiple queries with a formula to calculate ratios or complex metrics:With Environment and Resource Tags
Latency Percentile
Example Success Conditions
Template Variables
The Datadog provider supports Go templates in theapiKey, appKey, site,
formula, and queries fields:
Storing Secrets in Variables
For sensitive values like API keys, use deployment variables:- Create deployment variables for your Datadog credentials
- Reference them in the provider configuration using template syntax
Finding Your Datadog Keys
API Key
- Go to Datadog console → Organization Settings → API Keys
- Create or copy an existing API key (40-character hex string)
Application Key
- Go to Datadog console → Organization Settings → Application Keys
- Create or copy an existing Application key
- Important: Use the actual key value, NOT the “Key ID” (which is a UUID)
Best Practices
- Use deployment variables for API keys and application keys - never hardcode credentials
- Name queries descriptively to make success conditions readable
- Use appropriate intervals - shorter intervals provide faster feedback but may have less data
- Tag your metrics with service, environment, and version information for better filtering
- Test queries manually in Datadog before using them in verification
- Handle missing data by checking
result.okandresult.queries.<name> != null - Use formulas for calculated metrics like error rates or ratios