Configuration
Properties
| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "datadog" |
apiKey | string | Yes | Datadog API key (supports Go templates) |
appKey | string | Yes | Datadog Application key (supports templates) |
query | string | Yes | Datadog metrics query (supports templates) |
site | string | No | Datadog site (default: datadoghq.com) |
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:result.ok-trueif API call succeededresult.statusCode- HTTP status code from Datadog APIresult.value- Last metric value from the queryresult.json- Full Datadog API responseresult.query- The resolved query string (after template expansion)result.duration- Request duration in milliseconds
Example Queries
Error Rate
Latency Percentile
With Environment Tags
Rate of 5xx Errors
Example Success Conditions
Template Variables
The Datadog provider supports Go templates in theapiKey, appKey, and
query 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
Best Practices
- Use deployment variables for API keys and application keys - never hardcode credentials
- Use appropriate time windows in your queries (e.g.,
.as_rate()for rates) - 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.value != null - Use rate functions for error rates and request rates to get meaningful values