honeycombio / terraform-honeycombio-opentelemetry-starter-pack

A terraform starter pack for creating honeycomb nouns for standard opentelemetry data
Other
5 stars 2 forks source link

`unknown column name: db.type` error #16

Open menzenski opened 1 year ago

menzenski commented 1 year ago

Versions 0.3.0

Steps to reproduce

My main.tf file:

terraform {
  backend "remote" {
    organization = "$NAME"

    workspaces {
      name = "$NAME"
    }
  }

  required_providers {
    honeycombio = {
      source  = "honeycombio/honeycombio"
      version = "~> 0.13.1"
    }
  }
}

provider "honeycombio" {}

module "explore-honeycombio-opentelemetry-starter-pack" {
  source  = "honeycombio/opentelemetry-starter-pack/honeycombio"
  version = "0.3.0"
}

terraform apply in Terraform Cloud fails with the following error:

Terraform v1.4.5
on linux_amd64
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_ensure_nonroot_server_span: Creating...
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_error_as_a_numeric: Creating...
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_log10_duration: Creating...
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_protocols: Creating...
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_db_system_or_type: Creating...
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_bad_status_code_as_a_numeric: Creating...
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_bad_status_code_as_a_numeric: Creation complete after 0s [id=FbL51QF32g1]
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_log10_duration: Creation complete after 0s [id=bpHXJDe2KLk]
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_error_as_a_numeric: Creation complete after 0s [id=9hVA25Chqbu]
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_protocols: Creation complete after 0s [id=J4AZdvwW34v]
module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_ensure_nonroot_server_span: Creation complete after 0s [id=5o5YCFwPaq5]
╷
│ Error: 400 Bad Request: unknown column name: db.type
│ 
│   with module.explore-honeycombio-opentelemetry-starter-pack.module.environment_wide_derived_columns.honeycombio_derived_column.dc_db_system_or_type,
│   on .terraform/modules/explore-honeycombio-opentelemetry-starter-pack/modules/environment_derived_columns/db_system_or_type.tf line 4, in resource "honeycombio_derived_column" "dc_db_system_or_type":
│    4: resource "honeycombio_derived_column" "dc_db_system_or_type" {
│ 
╵
Operation failed: failed running terraform apply (exit 1)

Additional context

I do have OpenTelemetry data present in the Honeycomb environment where I am attempting to create these resources. That data was mostly exported from Java applications using the io.opentelemetry.javaagent:opentelemetry-javaagent:1.19.0 agent. Also we are using MongoDB. I do not see the db.type column in my Honeycomb environment.

menzenski commented 1 year ago

In the end I was able to get this working after importing several columns. (And it's awesome!)