Skip to content

lightstep/terraform-opentelemetry-dashboards

Repository files navigation

Terraform Module for Cloud Observability OpenTelemetry Dashboards

⚠️ You are viewing a beta version of the official module to create and manage OpenTelemetry Dashboards inside Cloud Observability.

This is a Terraform module for deploying a pre-defined set of OpenTelemetry dashboards in Cloud Observability. Most users will only be interested in a small subset of the dashboards.

Pre-requisites

  • Cloud Observability account and API Key with member permissions.
  • Applicable metrics from your integration sending to your Cloud Observability project.
  • Terraform v1.0+

Supported Resources

Each resource has an associated module that will create Cloud Observability dashboards to view metrics. Currently, these resources are supported:

How to Use This Module

This repo has the following folder structure:

  • collector-dashboards: This folder contains standalone, reusable, modules that you can use to create different types of Cloud Observability dashboards for commonly used resources.
  • examples: This folder shows examples of different ways to define creation of dashboards.
  • root folder: The root folder is an example of how to use the terraform-opentelemetry-dashboards module to create Cloud Observability OpenTelemetry Dashboards. The Terraform Registry requires the root of every repo to contain Terraform code, so we've put one of the examples there. This example is great for learning and experimenting, but for production use, please use the underlying modules in the collector-dashboards folder directly.

To deploy create Cloud Observability dashboards for production using this repo:

  • Ensure account meets module pre-requisites from above.

  • Create a Terraform configuration that pulls module(s) and specifies values of the required variables.

  • Run terraform init and terraform apply with your API Key set in the environment variable LIGHTSTEP_API_KEY (or the environment variable name you specified in configuration).

Development

This repository uses pre-commit and tflint to format and lint HCL code.

To install:

    $ brew install tflint
    $ brew install pre-commit
    $ pre-commit install

Contributing New Dashboards

After you add a new dashboard module run make ready which will fix minor formatting issues, generate the root module files, and generate the document you're reading.