Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Observability as Code

Kerim Satirli
September 23, 2020

Observability as Code

In this webinar, Dan Maher (Developer Advocate at Datadog), and I look at how to use the Datadog Provider for Terraform to codify observability resources such as Application Performance Monitors (APM) and Dashboards.

This version of the webinar was given at a Datadog webinar in September 2020.

---

Companion Code: github.com/hashicorp/observability-as-code

Kerim Satirli

September 23, 2020
Tweet

More Decks by Kerim Satirli

Other Decks in Technology

Transcript

  1. Agenda ▪ What is Datadog? ▪ What is Terraform? ▪

    What is Observability as Code? ▪ How do Datadog and Terraform integrate? ▪ Q&A
  2. Datadog Provider for Terraform CODE EDITOR terraform { required_providers {

    datadog = { source = "datadog/datadog" version = "2.13.0" } } required_version = "~> 0.13" }
  3. Datadog Monitor CODE EDITOR resource "datadog_monitor" "high_error_rate" { for_each =

    var.services name = "HIGH: ${each.key} (${each.value.env})" type = "query alert" message = "${each.key} has a high error rate!" ... }
  4. Datadog Monitor CODE EDITOR ... query = "avg(last_10m):(sum:trace.$ {each.value.framework}.request.errors{env:$ {each.value.environment},service:${each.key}

    } / sum:trace.$ {each.value.framework}.request.hits{env:$ {each.value.environment},service:${each.key} }) > $ {each.value.high_error_rate_critical}"
  5. Resources ▪ Datadog: datadoghq.com/free-datadog-trial ▪ Terraform Cloud: app.terraform.io/signup ▪ Terraform

    provider: registry.terraform.io/providers/datadog/datadog ▪ webshop code: github.com/datadog/ecommerce-workshop ▪ workshop code: github.com/hashicorp/observability-as-code