Provides a Datadog SpansMetric resource. This can be used to create and manage Datadog spans_metric.
# 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"
}
}
name
(String) The name of the span-based metric. This field can't be updated after creation.compute
(Block, Optional) (see below for nested schema)filter
(Block, Optional) (see below for nested schema)group_by
(Block Set) (see below for nested schema)id
(String) The ID of this resource.compute
Required:
aggregation_type
(String) The type of aggregation to use. This field can't be updated after creation.Optional:
include_percentiles
(Boolean) Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregation_type
is distribution
.path
(String) The path to the value the span-based metric will aggregate on (only used if the aggregation type is a "distribution"). This field can't be updated after creation.filter
Optional:
query
(String) The search query - following the span search syntax. Defaults to "*"
.group_by
Required:
path
(String) The path to the value the span-based metric will be aggregated over.Optional:
tag_name
(String) Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.Import is supported using the following syntax:
terraform import datadog_spans_metric.testing_spans_metric testing.span.metric