datadog_spans_metric (Resource)

Provides a Datadog SpansMetric resource. This can be used to create and manage Datadog spans_metric.

Example Usage

# Create new spans_metric resource

resource "datadog_spans_metric" "testing_spans_metric" {
  name = "testing.span.metric"
  compute {
    aggregation_type    = "distribution"
    include_percentiles = false
    path                = "@duration"
  }
  filter {
    query = "@http.status_code:200 service:my-service"
  }
  group_by {
    path     = "resource_name"
    tag_name = "resource_name"
  }
}

Schema

Required

Optional

Read-Only

Nested Schema for compute

Required:

Optional:

Nested Schema for filter

Optional:

Nested Schema for group_by

Required:

Optional:

Import

Import is supported using the following syntax:

terraform import datadog_spans_metric.testing_spans_metric testing.span.metric