Datadog is an analytics tool that can be used for event monitoring, log collection, and much more. As you scale your Terraform usage, the ability to analyze the run results, run execution time, and any other aspect of Terraform runs becomes extremely important to optimize your overall Terraform workflow.

Events

The Datadog integration can currently stream event details for Terraform runs executed in Scalr. To integrate with Datadog, simply go to the integrations page at the account scope, select Datadog, and add the necessary information:

2568

At this point, just select the necessary connections and the integration is complete. You will now see Terraform run events in Datadog!

2718

You can now build reports and dashboards in Datadog to analyze your Terraform events. For example, break down run results per environment:

2680

Metrics

Send metrics to Datadog for in-depth analysis and reporting such as queue runs, queue state, the number of environments, and workspace count. These metrics are visualized in their out-of-the-box dashboard to help correlate deployments with other infrastructure changes and to track trends within your Terraform pipeline.

See how to install the Datadog agent and enable the Scalr integration here.

MetricDescriptions
scalr.environments.countTotal number of environments
scalr.workspaces.countTotal number of workspaces
scalr.runs.countTotal number of runs
scalr.runs.successfulNumber of runs in applied or planned_and_finished status
scalr.runs.failedNumber of runs in an errored status
scalr.runs.awaiting_confirmationNumber of runs in planned, policy_checked, policy_override, cost_estimated status
scalr.runs.concurrencyNumber of runs in planning, policy_checking, cost_estimating, applying status
scalr.runs.queue_sizeNumber of runs in plan_queued or apply_queued status
scalr.quota.max_concurrencyThe quota.max_concurrent_runs value (account quota)
scalr.billing.runs.countThe number of runs in the current billing period
scalr.billing.run_minutes.countThe number of run minutes used in the current billing period
scalr.billing.flex_runs.countThe number of flex runs used in the current billing period
scalr.billing.flex_run_minutes.countThe number of run minutes used in current billing period

You can also utilize the Scalr integrations dashboard by default by going to Dashboards->Integrations in Datadog:

1906