Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datadog_dashboard.list_stream_definition.request.query.data_source does not support trace_stream #2036

Closed
dlbock opened this issue Jul 27, 2023 · 1 comment
Labels

Comments

@dlbock
Copy link

dlbock commented Jul 27, 2023

Datadog Terraform Provider Version

v.3.28.0

Terraform Version

v1.5.3

What resources or data sources are affected?

datadog_dashboard.list_stream_definition.request.query.data_source

Terraform Configuration Files

resource "datadog_dashboard" "application_dashboard_by_env" {
  title       = "My Dashboard"
  description = "Key metrics for monitoring my-service"
  layout_type = "ordered"

  template_variable {
    name             = "env"
    available_values = ["dev", "qa", "prod"]
    defaults         = ["prod"]
  }

  template_variable_preset {
    name = "dev"
    template_variable {
      name   = "env"
      values = ["dev"]
    }
  }

  template_variable_preset {
    name = "qa"
    template_variable {
      name   = "env"
      values = ["qa"]
    }
  }

  template_variable_preset {
    name = "prod"
    template_variable {
      name   = "env"
      values = ["prod"]
    }
  }

  widget {
    widget_layout {
      height = 6
      width  = 12
      x      = 0
      y      = 13
    }
    group_definition {
      title       = "Service Traces - $env"
      layout_type = "ordered"
      widget {
        widget_layout {
          height = 5
          width  = 12
          x      = 0
          y      = 0
        }
        list_stream_definition {
          title = "Service Traces - $env"
          request {
            response_format = "event_list"
            columns {
              field = "resource_name"
              width = "auto"
            }
            columns {
              field = "@duration"
              width = "auto"
            }
            columns {
              field = "@http.method"
              width = "auto"
            }
            columns {
              field = "@http.status_code"
              width = "auto"
            }
            columns {
              field = "span_count"
              width = "auto"
            }
            columns {
              field = "latency_breakdown"
              width = "auto"
            }
            query {
              data_source  = "trace_stream"
              query_string = "env:$env service:my-service"
            }
          }
        }
      }
    }
  }
}

Relevant debug or panic output

N/A

Expected Behavior

In fact, I am able to manually add a list widget to display spans and the exported JSON for that widget looks like this:

{
  "id": 4482528406956021,
  "definition": {
    "title": "My Service Traces: $env",
    "title_size": "16",
    "title_align": "left",
    "requests": [
      {
        "response_format": "event_list",
        "columns": [
          {
            "field": "resource_name",
            "width": "auto"
          },
          {
            "field": "@duration",
            "width": "auto"
          },
          {
            "field": "@http.method",
            "width": "auto"
          },
          {
            "field": "@http.status_code",
            "width": "auto"
          },
          {
            "field": "span_count",
            "width": "auto"
          },
          {
            "field": "latency_breakdown",
            "width": "auto"
          }
        ],
        "query": {
          "data_source": "trace_stream",
          "query_string": "env:$env service:my-service"
        }
      }
    ],
    "type": "list_stream"
  },
  "layout": {
    "x": 0,
    "y": 7,
    "width": 12,
    "height": 5
  }
}

Actual Behavior

I get the following error when trying to apply the aforementioned Terraform code:

invalid value 'trace_stream' for ListStreamSource: valid values are
│ [logs_stream audit_stream ci_pipeline_stream ci_test_stream
│ rum_issue_stream apm_issue_stream logs_issue_stream logs_pattern_stream
│ logs_transaction_stream event_stream]

Steps to Reproduce

  • Create a dashboard resource like the example above.
  • Add the provider configuration.
  • terraform init
  • terraform apply

Important Factoids

N/A

References

N/A

@nkzou
Copy link
Contributor

nkzou commented Sep 1, 2023

Closed by the sdk bump in #2089 , this will be available in the next release, planned for the end of September.

@nkzou nkzou closed this as completed Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants