Managing Dashboards as Code

Learn how to manage Dash0 dashboards as code using JSON editing, Kubernetes Operator integration, and Terraform. Implement version control, automation, and consistency for your OpenTelemetry observability resources.

Overview

Dashboards as Code is an approach to managing your observability dashboards using code-based definitions rather than manual configuration through a user interface. Dash0 provides multiple methods to implement Dashboards as Code, allowing you to version control, automate deployment, and maintain consistency across your observability resources. This page covers the available options for managing your Dash0 dashboards using code, including editing dashboard JSON directly, using the Dash0 Operator with Kubernetes, and integrating with Terraform.

Via Edit as JSON

Dash0's "Edit as JSON" feature provides direct access to dashboard configurations in JSON format. This capability allows for control over your observability dashboards through a code-first approach, leveraging the Perses CRD (Custom Resource Definition) format.

The JSON editor can be accessed by clicking on Edit as JSON within the top-right corner of the dashboard viewer.

The Edit as JSON dialog. Showing a JSON code editor and an upload control.
Within the Edit as JSON dialog you can see the dashboard source and modify it.

The JSON editor is convenient for copying dashboards across organizations and datasets or for executing batch modifications across the whole dashboard, e.g., adapting PromQL queries when an attribute key has changed.

Via the Dash0 Operator

The Dash0 Kubernetes Operator provides a Kubernetes-native way to manage dashboards as code, leveraging Kubernetes CRDs and the Perses format. Teams leveraging Kubernetes that co-locate observability configuration to their services' source code will find this most beneficial.

The Dash0 Operator watches for Perses dashboard resources in namespaces with a Dash0 monitoring resource deployed. When it detects changes:

  • New Perses dashboard resources are created as dashboards in Dash0
  • Modified resources update the corresponding dashboards
  • Deleted resources remove the corresponding dashboards

To learn more how to get started, head over to our dedicated Dash0 Kubernetes Operator documentation.

Via Terraform

Through the Dash0 Terraform provider you can manage your Dash0 dashboards as part of your infrastructure-as-code workflows, enabling version control and automation of your observability resources.

To learn more how to get started, head over to our dedicated documentation on the Terraform provider.

Last updated: May 4, 2025