Dash0 acquires Polar Signals

Last updated:

Manage Views as Code

Define and manage views using the Dash0 Operator for Kubernetes, Dash0 Terraform provider, and Dash0 CLI for version control, workflows, and automated deployment.

Views are Dash0 assets that can be versioned and managed as infrastructure as code. This approach enables version control, automated deployment pipelines, consistent configuration across environments, and code review for view changes.

Tip

Agent0 can generate infrastructure-as-code configurations for views and raise them as pull requests to your repository. After creating a view with Agent0, request the corresponding Terraform configuration or Kubernetes manifest to keep your observability in code. See Asset Creation for details.

Dash0 Operator for Kubernetes

Define views as Dash0View custom resources that sync to Dash0, enabling workflows and native Kubernetes management.

Example

yaml
apiVersion: operator.dash0.com/v1alpha1
kind: Dash0View
metadata:
  name: error-logs
  namespace: monitoring
spec:
  type: logs
  display:
    name: Error Logs
    description: All error-level logs from production services
  groupBy:
    - service.name
    - k8s.pod.name
  filter:
    - key: severity
      operator: equals
      value: ERROR
    - key: k8s.namespace.name
      operator: equals
      value: production

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

  • New view resources are created as views in Dash0
  • Modified resources update the corresponding views
  • Deleted resources remove the corresponding views

Apply and Manage

bash
# Apply the view
kubectl apply -f view.yaml

# List all views
kubectl get dash0views -n monitoring

# View details
kubectl describe dash0view error-logs -n monitoring

# Update the view
kubectl edit dash0view error-logs -n monitoring

# Delete the view
kubectl delete dash0view error-logs -n monitoring

For more information, refer to the Dash0 Operator for Kubernetes documentation.

Dash0 Terraform Provider

Manage views in your Terraform infrastructure alongside other cloud resources for unified infrastructure management.

Example Usage

hcl
terraform {
  required_providers {
    dash0 = {
      source  = "dash0hq/dash0"
      version = "~> 1.0"
    }
  }
}

provider "dash0" {
  url        = "https://api.dash0.com"
  auth_token = "auth_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

resource "dash0_view" "error_logs" {
  dataset   = "production"
  view_yaml = <<-EOT
    kind: Dash0View
    metadata:
      name: error-logs
    spec:
      type: logs
      display:
        name: Error Logs
        description: All error-level logs from production services
      groupBy:
        - service.name
      filter:
        - key: severity
          operator: equals
          value: ERROR
        - key: k8s.namespace.name
          operator: equals
          value: production
  EOT
}

For more information, see the dash0_view resource documentation.

Dash0 CLI

Script view operations with the Dash0 CLI for automated deployments and batch operations.

Create from File

bash
# Create a view from a YAML file
dash0 views create --dataset production -f error-logs.yaml

List Views

bash
# List all views in a dataset
dash0 views list --dataset production

Get View Details

bash
# Get a single view as YAML
dash0 views get --dataset production <id> -o yaml

# Get view details in JSON format
dash0 views get --dataset production <id> -o json

Update View

bash
# Update an existing view
dash0 views update --dataset production <id> -f error-logs-updated.yaml

Delete View

bash
# Delete a view
dash0 views delete --dataset production <id>

For more information, see the Dash0 CLI command reference.

Further Reading