Data Source: honeycombio_query_specification

Generates a Query Specificaiton in JSON format.

This is a data source which can be used to construct a JSON representation of a Honeycomb Query Specification. The json attribute contains a serialized JSON representation which can be passed to the query_json field of the honeycombio_query resource for use in boards and triggers.

Example Usage

data "honeycombio_query_specification" "example" {
  # zero or more calculation blocks
  calculation {
    op     = "AVG"
    column = "duration_ms"
  }

  # zero or more filter blocks
  filter {
    column = "trace.parent_id"
    op     = "does-not-exist"
  }

  filter {
    column = "app.tenant"
    op     = "="
    value  = "ThatSpecialTenant" 
  }

  filter_combination = "AND"

  breakdowns = ["app.tenant"]

  time_range = 28800 // in seconds, 8 hours
}

output "json_query" {
    value = data.honeycombio_query_specification.example.json
}

Argument Reference

The following arguments are supported:

Each query configuration may have zero or more calculation blocks, which each accept the following arguments:

Each query configuration may have zero or more filter blocks, which each accept the following arguments:

Each query configuration may have zero or more order blocks, which each accept the following arguments. An order term can refer to a calculation or a column set in breakdowns. When referring to a calculation, op and column must be the same as the calculation.

Each query configuration may have zero or more having blocks, which each accept the following arguments.

Attribute Reference

In addition to all arguments above, the following attributes are exported: