eBPF Continuous Profiling released

Last updated:

Command Reference

Full reference for every dash0 CLI command, with syntax, flags, expected outputs, and examples for AI agents and automation workflows.

This document is a comprehensive reference for the dash0 CLI, aimed at enabling AI agents and automation workflows to use it effectively.

For every command, this reference lists the exact syntax, all flags, expected outputs, and concrete examples.

Command taxonomy

Every command falls into one of eight categories. Each category has distinct patterns for flags, output, and behavior.

CategoryCommandsCharacteristics
Authenticationlogin, logoutBrowser-based OAuth 2.0 + PKCE; per-profile
Configurationconfig profiles, config showProfile management, no API calls
Asset CRUDdashboards, views, check-rules, synthetic-checks, slos, evals, recording-rules, notification-channels, spam-filters, time-series-aggregations, signal-to-metrics-rules, apply, diffFile-based input, --dry-run, five standard subcommands
Querylogs query, spans query, traces get, metrics instant, failed-checks queryTime range, filters
Sendlogs send, spans sendOTLP-based, repeatable attribute flags
Daemonotlp proxyLong-running, signal-driven shutdown, experimental
Organizationalteams, members, notification-channels, datasets, auth-tokens, agent0 skills, aws-metric-scrape-configsFlag-based input, no dataset, experimental
Raw HTTPapiPassthrough to any Dash0 API endpoint, experimental
Agent toolingskill install, skill showNo API calls; local filesystem only; not gated by --experimental; no -o/JSON output — content is always plain markdown

Authentication commands populate or revoke the OAuth tokens of a profile. A profile can be in one of three auth states: static (holds a long-lived auth_* token), OAuth-active (holds a dash0_at_* access token and a refresh token; auto-refreshes), or OAuth-empty (marked as OAuth but not yet logged in). dash0 login requires an interactive terminal and never silently mutates a static profile. dash0 logout clears the OAuth tokens from a profile but keeps the profile shell for re-login.

Asset CRUD commands create, list, get, update, and delete dataset-scoped assets (dashboards, views, check rules, synthetic checks, recording rules). They use file-based input (-f), support --dry-run, and offer five output formats (table, wide, json, yaml, csv). The apply command provides create-or-update semantics across all asset types, and (experimentally, via --since) delete semantics based on git history. The experimental diff command previews what apply would do, fetching each document's current state from Dash0 first so it can tell a create from an update, without creating, updating, or deleting anything.

Query commands search and retrieve telemetry signals. They accept time range flags (--from, --to), a repeatable --filter flag with the standard filter syntax, and customizable columns via --column. Output formats are table, json, and csv.

Send commands transmit telemetry data to Dash0 via OTLP. They require otlp-url (not api-url) and use repeatable attribute flags (--resource-attribute, --scope-attribute, and a signal-specific attribute flag).

Organizational commands manage entities (teams, members, notification channels, datasets, auth tokens, Agent0 skills, AWS metric scrape configs) scoped to the organization, not to a dataset. They use flag-based input (no -f, no --dry-run) and are all experimental. Notification channels, datasets, auth tokens, Agent0 skills, and AWS metric scrape configs are exceptions: they use file-based input (-f) and support --dry-run, but are still organization-level (no --dataset). Notification channels, datasets, Agent0 skills, and AWS metric scrape configs are also wired into apply; auth tokens are not, because apply has no safe place to deliver a new token's secret.

Raw HTTP command (api) is an escape hatch for endpoints that do not yet have a dedicated subcommand. It reuses the active profile's api-url, auth-token, and (by default) dataset, and emits a plain HTTP request. It is experimental.

Agent tooling commands (skill install, skill show) distribute the dash0-cli Agent Skill — a bundle that teaches AI coding agents this CLI's command surface without spending turns on --help exploration. They never call the Dash0 API, so they take no --api-url, --auth-token, or --dataset, and they are not gated behind --experimental since the entire point is frictionless discovery. Unlike every other command, their output is always plain markdown, in both human and agent mode — see Agent tooling commands for why.

Prerequisites

Every command that talks to the Dash0 API or OTLP endpoint needs credentials. The CLI resolves each individual setting (api-url, otlp-url, auth-token, dataset) in this order (first match wins):

  1. CLI flags (--api-url, --otlp-url, --auth-token or --auth-token-file, --dataset)
  2. Environment variables (DASH0_API_URL, DASH0_OTLP_URL, DASH0_AUTH_TOKEN, DASH0_DATASET)
  3. The selected profile (see below)

Each setting is resolved independently. Setting DASH0_AUTH_TOKEN and DASH0_API_URL does not discard the rest of the selected profile: dataset and otlp-url still come from the profile unless DASH0_DATASET, --dataset, DASH0_OTLP_URL, or --otlp-url names them explicitly. Run dash0 config show to see the effective values and where each one came from.

The profile itself is selected in this order (first match wins):

  1. --profile <name> flag
  2. DASH0_PROFILE environment variable
  3. The active profile recorded on disk (set via config profiles select, stored in ~/.dash0/)

Using --profile or DASH0_PROFILE does not modify the active profile on disk — it only changes which profile is read for the current invocation. Passing --profile "" or DASH0_PROFILE="" is treated as "not set" and falls through to the next step. If the selected profile does not exist, the command fails before making any API call with a message listing the available profile names.

Commands that read from the API (asset CRUD, logs query, spans query, traces get, metrics instant) require api-url and auth-token. Commands that write via OTLP (logs send, spans send) require otlp-url and auth-token.

Read the auth token from a file

--auth-token-file <path> reads the auth token from a file that contains only the token. Use it with secrets that are mounted as files, such as Kubernetes secrets, Docker secrets, or systemd credentials. The token then does not appear in the process list or in the shell history.

The CLI removes leading and trailing whitespace, such as a trailing newline, from the file content. An empty file, or a file with more than one line, is an error. The token from the file resolves in the same way as a token from --auth-token, and the two flags are mutually exclusive. The CLI reads the file only when the command calls the Dash0 API or the OTLP endpoint.

Query logs with a token from a Kubernetes secret mounted at /var/run/secrets/dash0:

bash
dash0 logs query --auth-token-file /var/run/secrets/dash0/auth-token

Apply assets with a token from a Docker secret:

bash
dash0 apply -f assets/ --auth-token-file /run/secrets/dash0_auth_token

Send a log record with a token from a systemd credential (LoadCredential=dash0-auth-token:... in the unit file):

bash
dash0 logs send "Backup completed" --auth-token-file "$CREDENTIALS_DIRECTORY/dash0-auth-token"

Global flags

These flags are available on every command:

FlagShortEnv variableDescription
--api-urlDASH0_API_URLAPI endpoint URL
--otlp-urlDASH0_OTLP_URLOTLP HTTP endpoint URL
--auth-tokenDASH0_AUTH_TOKENAuthentication token
--auth-token-fileRead the authentication token from a file (see Read the auth token from a file); mutually exclusive with --auth-token
--datasetDASH0_DATASETDataset identifier (not display name)
--profileDASH0_PROFILEProfile to use for this invocation; overrides the active profile on disk
--agent-modeDASH0_AGENT_MODEEnable agent mode for AI coding agents (see below)
--colorDASH0_COLORsemantic (default) or none
--experimental-XEnable experimental commands
--config-dirDASH0_CONFIG_DIROverride config directory (default: ~/.dash0); the flag takes precedence over the environment variable
--max-retriesDASH0_MAX_RETRIESMaximum number of retries for failed API requests (default: 3, max: 5; set to 0 to disable retries)
--no-skill-hintDASH0_NO_SKILL_HINTSuppress the agent-mode error hint pointing at dash0 skill install / dash0 skill show (see Agent tooling commands)

Agent mode

Agent mode optimizes the CLI for consumption by AI coding agents. When active, the CLI:

  1. Defaults output format to JSON instead of tables.
  2. Returns --help as structured JSON with flags, subcommands, and metadata.
  3. Emits errors as JSON objects on stderr.
  4. Skips confirmation prompts automatically (same as --force).
  5. Disables colored output.

Agent mode is resolved in this priority order (first match wins):

  1. --agent-mode flag — explicitly enabled, or explicitly disabled with --agent-mode=false.
  2. DASH0_AGENT_MODE=0|false — explicitly disabled via environment variable.
  3. DASH0_AGENT_MODE=1|true — explicitly enabled via environment variable.
  4. Auto-detection via known AI agent environment variables: AIDER, CLAUDE_CODE, CLAUDECODE, CLINE, CLINE_TASK_ID, CODEX, CURSOR_AGENT, CURSOR_SESSION_ID, GITHUB_COPILOT, MCP_SESSION_ID, OPENAI_CODEX, WINDSURF_AGENT, WINDSURF_SESSION_ID.

Authentication

dash0 login and dash0 logout manage the OAuth tokens of a profile. Both commands operate on the active profile by default; pass --profile <name> to target a specific one.

Profile auth states

A profile is in exactly one of three auth states:

StateAuth Token: in config showHow to get there
Staticmasked ...auth_*dash0 config profiles create <name> --auth-token auth_<...>
OAuth-empty(OAuth, not logged in)dash0 config profiles create <name> --oauth, dash0 config profiles update <name> --oauth, or dash0 logout from OAuth-active
OAuth-activemasked ...dash0_at_* with (OAuth, expires in …)dash0 login on an OAuth-empty or OAuth-active profile

OAuth-empty profiles cannot serve API calls — running a CLI command against one prints the active profile is OAuth-typed but not authenticated. Hint: Run \dash0 login` to log in.(orprofile "" is OAuth-typed but not authenticated.when--profile` was passed).

In agent mode (--agent-mode or DASH0_AGENT_MODE=1), the hint is rewritten because dash0 login requires an interactive terminal. Agents are routed to two escape hatches: either set DASH0_AUTH_TOKEN to a static auth_* token, or convert the profile back to static auth with dash0 config profiles update <name> --oauth=false --auth-token auth_<...> --force. The same agent-mode hint appears when an OAuth refresh fails at the API layer (token revoked or expired server-side).

login

Authenticate to Dash0 via OAuth 2.0 with PKCE. Opens the system browser, listens on a localhost TCP port for the callback, exchanges the authorization code for tokens, and saves them in the target profile.

bash
dash0 login [--profile <name>] [--api-url <url>] [--port <n>] [--timeout <duration>]
FlagDefaultDescription
--profileactive profileProfile to save tokens under
--api-urlactive profile's URL / DASH0_API_URLDash0 API URL to authenticate against
--portOS-assigned ephemeralLocal TCP port for the OAuth callback listener
--timeout2mHow long to wait for the browser callback before aborting

State machine:

  • OAuth-empty / OAuth-active target — proceeds silently. Re-login on an OAuth-active profile revokes the prior refresh token best-effort.
  • Static target — prompts: <profile> uses a static auth token. Convert it to an OAuth profile (the existing auth token will be discarded)? [y/N]:. Aborts cleanly on n.
  • No-auth target — prompts: <profile> has no auth token configured. Mark it as OAuth and log in? [y/N]:. Aborts cleanly on n.
  • Missing target — prompts to create the profile as OAuth before proceeding.
  • No active profile and no --profile — fails immediately with a hint pointing at dash0 config profiles create and dash0 login --profile <name>.

The command requires an interactive terminal. In agent mode or when stdout is not a TTY, it exits with an error pointing at the static-token fallback (DASH0_AUTH_TOKEN or dash0 config profiles create --auth-token).

Log in to the active profile:

bash
$ dash0 login
Opening your browser to log in to https://api.eu-west-1.aws.dash0.com
If the browser does not open automatically, paste this URL:
  https://api.eu-west-1.aws.dash0.com/oauth/authorize?...
Logged in as profile "prod" (access token expires in 1h0m0s).

Log in to a specific profile:

bash
dash0 login --profile staging

Log in to a Dash0 region different from the active profile:

bash
dash0 login --profile eu --api-url https://api.eu-west-1.aws.dash0.com

The OAuth client registration (RFC 7591) is cached per API URL in ~/.dash0/oauth-clients.json, so re-running login against the same Dash0 region does not re-register a new client every time. The cache is invalidated automatically when the server reports invalid_client during token exchange.

OAuth access tokens are organization-scoped: each token is bound to whichever Dash0 organization the user picks during the browser consent step. Profiles for different organizations must each go through their own dash0 login.

logout

Clear the OAuth tokens of a profile and best-effort revoke them server-side. The profile shell is kept so a future dash0 login can re-fill it.

bash
dash0 logout [--profile <name>] [--force]
FlagDefaultDescription
--profileactive profileProfile to log out of
--forcefalseSkip the confirmation prompt

Refuses to operate on static-token profiles and points the user at dash0 config profiles delete instead. Logging out of an OAuth-empty profile is a no-op and exits 0.

In agent mode (--agent-mode or DASH0_AGENT_MODE=1, also auto-detected from agent env vars like CLAUDE_CODE), logout requires an explicit --force and otherwise refuses with an error. This mirrors dash0 login's blanket refusal to run in agent mode: both directions of the OAuth session transition require deliberate user intent, so an AI agent invoking dash0 logout cannot silently revoke the refresh token of whichever profile the env points at.

Log out of the active profile:

bash
$ dash0 logout
Log out of the active profile 'prod' (revoking its OAuth refresh token)? [y/N]: y
Logged out.

Log out of a named profile without confirmation:

bash
$ dash0 logout --profile staging --force
Logged out of profile "staging".
Note

To leave OAuth behind entirely (not just log out), use dash0 config profiles update <name> --oauth=false. That clears the OAuth marker and lets the profile take a static token again.

Configuration

config profiles create

Create a new named profile. All fields are optional at creation time. The first profile created becomes the active profile automatically.

bash
dash0 config profiles create <name> \
    [--api-url <url>] \
    [--otlp-url <url>] \
    [--auth-token <token>] \
    [--dataset <dataset>] \
    [--oauth]

Pass --oauth to mark the profile as OAuth-authenticated. An OAuth profile is created in the OAuth-empty state — --api-url is required (so dash0 login knows where to authenticate), and --oauth is mutually exclusive with --auth-token. Run dash0 login afterwards to obtain the access and refresh tokens.

Example — static-token profile:

bash
$ dash0 config profiles create dev \
    --api-url https://api.us-west-2.aws.dash0.com \
    --otlp-url https://ingress.us-west-2.aws.dash0.com \
    --auth-token auth_xxx
Profile "dev" added

Example — OAuth profile:

bash
$ dash0 config profiles create dev --oauth \
    --api-url https://api.us-west-2.aws.dash0.com
Profile "dev" created (OAuth).
Hint: Run `dash0 login` to authenticate.

Aliases: add

config profiles update

Update an existing profile. Only the specified flags are changed; unspecified flags are left as-is. Pass an empty string to remove a field.

bash
dash0 config profiles update <name> \
    [--api-url <url>] \
    [--otlp-url <url>] \
    [--auth-token <token>] \
    [--dataset <dataset>] \
    [--oauth[=true|=false]] \
    [--force]

--oauth is the off-ramp for switching a profile between static and OAuth authentication. Both transitions are destructive and prompt for confirmation unless --force is set:

  • --oauth (or --oauth=true) on a static profile discards the existing static token and marks the profile as OAuth-empty (run dash0 login next).
  • --oauth=false on an OAuth profile revokes its refresh token (best-effort) and clears the OAuth block. Pair it with --auth-token auth_<...> to land in a static profile in one command; otherwise the profile is left token-less and dash0 config profiles update must be used again to set one.

--oauth=true and --auth-token are mutually exclusive in the same invocation. Setting --auth-token on an OAuth-active profile without also passing --oauth=false is rejected — the library cannot interpret a profile that holds both a static token and an OAuth block.

Update the API URL of a profile:

bash
$ dash0 config profiles update prod --api-url https://api.us-east-1.aws.dash0.com
Profile "prod" updated

Convert a static-token profile to OAuth (prompts unless --force):

bash
$ dash0 config profiles update prod --oauth --force
Profile "prod" updated
Hint: Run `dash0 login` to authenticate.

Convert an OAuth profile back to static in one command:

bash
$ dash0 config profiles update prod --oauth=false --auth-token auth_xxx --force
Profile "prod" updated

Convert an OAuth profile back to no-auth (the user can set a token later):

bash
$ dash0 config profiles update prod --oauth=false --force
Profile "prod" updated
Hint: This profile has no auth token configured. Set one with `dash0 config profiles update prod --auth-token auth_<...>`.

Remove a field by passing an empty string:

bash
$ dash0 config profiles update prod --dataset ''
Profile "prod" updated

config profiles list

List all profiles. The active profile is marked with * in table output and with "active": true in JSON output.

bash
dash0 config profiles list [-o <format>] [--skip-header]
FlagShortDefaultDescription
--output-otableOutput format: table or json
--skip-headerfalseOmit the header row from table output

Example output:

  NAME  API URL                              OTLP URL                                    DATASET  AUTH
* dev   https://api.us-west-2.aws.dash0.com  https://ingress.us-west-2.aws.dash0.com     default  oauth ...dash0_at_xx (47m)
  prod  https://api.eu-west-1.aws.dash0.com  https://ingress.eu-west-1.aws.dash0.com     default  static ...uth_yyy
  cold  https://api.eu-west-1.aws.dash0.com                                              default  oauth (not logged in)

The AUTH column carries the auth state per profile:

  • static <masked-token> for a profile with a long-lived auth_* token.
  • oauth <masked-token> (<remaining-lifetime>) for an OAuth-active profile.
  • oauth (not logged in) for an OAuth-empty profile (created with --oauth but dash0 login not yet run, or just logged out).
  • (none) when no token is configured.

JSON output keeps the existing authToken field and adds a sibling authKind field with values static, oauth-active, oauth-empty, or none.

Use -o json to get structured output (the default in agent mode):

bash
$ dash0 config profiles list -o json

Use --skip-header to omit the header row from table output:

bash
$ dash0 config profiles list --skip-header

Aliases: ls

config profiles select

Set the active profile.

bash
dash0 config profiles select <name>

Example:

bash
$ dash0 config profiles select prod
Profile 'prod' is now active

Aliases: activate

config profiles delete

Delete a profile.

bash
dash0 config profiles delete <name>

Aliases: remove

config show

Display the resolved configuration (selected profile + environment variable overrides).

bash
dash0 config show

Example output for a static-token profile:

Profile:    prod
API URL:    https://api.eu-west-1.aws.dash0.com
OTLP URL:   https://ingress.eu-west-1.aws.dash0.com
Dataset:    default
Auth Token: ...uth_yyy

When the profile is OAuth, the Auth Token: line is annotated:

Profile:    dev
API URL:    https://api.us-west-2.aws.dash0.com
OTLP URL:   (not set)
Dataset:    default
Auth Token: ...dash0_at_xx    (OAuth, expires in 47m23s)

When the profile is OAuth but not yet logged in (OAuth-empty), the line points the user at dash0 login:

Profile:    dev
API URL:    https://api.us-west-2.aws.dash0.com
OTLP URL:   (not set)
Dataset:    default
Auth Token: (OAuth, not logged in)
            Hint: Run `dash0 login` to authenticate.

The hint elides --profile <name> when the displayed profile is already the active one.

-o json (the default in agent mode) emits the same fields plus an oauth object on OAuth profiles. For OAuth-active profiles the object contains clientId, expiresAt (RFC 3339), and "authenticated": true. For OAuth-empty profiles the object contains "authenticated": false plus a hint field naming the agent-mode recovery path (DASH0_AUTH_TOKEN or dash0 config profiles update <name> --oauth=false --auth-token auth_<...> --force). The oauth object is omitted entirely when DASH0_AUTH_TOKEN is set, because the static token shadows the OAuth state.

bash
$ dash0 config show -o json
{
  "profile": {"value": "dev"},
  "apiUrl": {"value": "https://api.us-west-2.aws.dash0.com"},
  ...
  "oauth": {
    "authenticated": false,
    "hint": "set DASH0_AUTH_TOKEN to a static `auth_*` token, or convert the profile with `dash0 config profiles update dev --oauth=false --auth-token auth_<...> --force`"
  }
}

When an environment variable overrides a profile value, the output indicates the source:

bash
$ DASH0_API_URL='http://test' dash0 config show
Profile:    dev
API URL:    http://test    (from DASH0_API_URL environment variable)
OTLP URL:   https://ingress.us-west-2.aws.dash0.com
Dataset:    default
Auth Token: ...ULSzVkM

When a profile is selected via --profile or DASH0_PROFILE, the Profile: line is annotated with the source:

bash
$ dash0 --profile prod config show
Profile:    prod    (from --profile flag)
...

$ DASH0_PROFILE=prod dash0 config show
Profile:    prod    (from DASH0_PROFILE environment variable)
...

Asset CRUD commands

Asset CRUD commands create, list, get, update, and delete Dash0 assets. Dash0 calls dashboards, views, synthetic checks, and check rules "assets" (not "resources", which is an overloaded term in OpenTelemetry).

All thirteen of these command groups (dashboards, check-rules, synthetic-checks, slos, evals, views, recording-rules, notification-channels, spam-filters, time-series-aggregations, signal-to-metrics-rules, and the organization-level teams and datasets) share the same CRUD subcommands. Ten of them are dataset-scoped assets; notification-channels, teams, and datasets are organization-level (no --dataset) but share the same subcommand shape. The examples below use dashboards, but the same patterns apply to every command group.

list

List all assets in the dataset.

bash
dash0 dashboards list [--limit <n>] [-o <format>] [--skip-header]
FlagShortDefaultDescription
--limit-l50Maximum number of results
--output-otabletable, wide, json, yaml, or csv
--skip-headerfalseOmit the header row from table and wide output

Example:

bash
$ dash0 dashboards list
NAME                                      ID
Production Overview                       a1b2c3d4-5678-90ab-cdef-1234567890ab
Staging Overview                          d4e5f6a7-8901-23de-f012-4567890abcde
...

The wide format adds DATASET, ORIGIN, and URL columns:

bash
$ dash0 dashboards list -o wide
NAME                  ID                                    DATASET   ORIGIN       URL
Production Overview   a1b2c3d4-5678-90ab-cdef-1234567890ab  default   gitops/prod  https://app.dash0.com/goto/dashboards?dashboard_id=a1b2c3d4-...

Use -o json or -o yaml to get the full asset definitions, suitable for backup or re-applying with apply -f -. The YAML output is a multi-document stream (documents separated by ---) so it can be piped directly to dash0 apply -f -. Use -o csv for a pipe-friendly, machine-readable format with the same columns as wide:

bash
$ dash0 dashboards list -o csv
name,id,dataset,origin,url
Production Overview,a1b2c3d4-5678-90ab-cdef-1234567890ab,default,gitops/prod,https://app.dash0.com/goto/dashboards?dashboard_id=a1b2c3d4-...

For dashboards, a failed name lookup emits a warning to stderr and shows <name> in table and wide output, or an empty name in csv output. Listing continues with the remaining dashboards, and name lookup failures do not change the exit status. JSON and YAML exports fail on any dashboard fetch error instead of producing incomplete definitions.

Aliases: ls

get

Retrieve a single asset by ID.

bash
dash0 dashboards get <id> [-o <format>]

Example (default table output):

bash
$ dash0 dashboards get a1b2c3d4-5678-90ab-cdef-1234567890ab
Kind: Dashboard
Name: Production Overview
Dataset: default
Origin: gitops/prod
URL: https://app.dash0.com/goto/dashboards?dashboard_id=a1b2c3d4-5678-90ab-cdef-1234567890ab
Created: 2026-01-15 10:30:00
Updated: 2026-01-20 14:45:00

Use -o yaml to get the full definition, suitable for editing and re-applying:

bash
$ dash0 dashboards get a1b2c3d4-5678-90ab-cdef-1234567890ab -o yaml
kind: Dashboard
metadata:
  name: a1b2c3d4-5678-90ab-cdef-1234567890ab
  ...
spec:
  display:
    name: Production Overview
  ...

get also returns a deleted asset, because the API keeps deleted assets instead of removing them. This applies to dashboards, check rules, synthetic checks, SLOs, evals, views, recording rules, time series aggregations, and signal-to-metrics rules. The table output then shows a Deleted: line with the deletion time, and -o yaml and -o json carry it as the dash0.com/deleted-at annotation under metadata.annotations:

bash
$ dash0 dashboards get a1b2c3d4-5678-90ab-cdef-1234567890ab
Kind: Dashboard
Name: Production Overview
Dataset: default
Deleted: 2026-01-21 09:15:00
Origin: gitops/prod
URL: https://app.dash0.com/goto/dashboards?dashboard_id=a1b2c3d4-5678-90ab-cdef-1234567890ab
Created: 2026-01-15 10:30:00
Updated: 2026-01-20 14:45:00

list does not show deleted assets.

create

Create a new asset from a YAML or JSON file.

bash
dash0 dashboards create -f <file> [--dry-run] [-o <format>]

Use -f - to read from stdin. The --dry-run flag validates the file without creating anything.

Example:

bash
$ dash0 dashboards create -f dashboard.yaml
Dashboard "My Dashboard" created

dashboards create also accepts PersesDashboard CRD files (perses.dev/v1alpha1 and perses.dev/v1alpha2).

bash
$ dash0 dashboards create -f persesdashboard.yaml
Dashboard "My Perses Dashboard" created

check-rules create also accepts PrometheusRule CRD files. Each alerting rule in the CRD is created as a separate check rule (recording rules are skipped). The check rule name is composed as <group name> - <alert name>, matching the name produced by the Dash0 Kubernetes operator and the Terraform provider for the same CRD. The CRD's top-level metadata.annotations are merged into every rule it contains (see PrometheusRule annotation merge).

bash
$ dash0 check-rules create -f prometheus-rules.yaml
Check rule "High Error Rate Alert" created

create with the identifier of a deleted asset brings that asset back (see Asset identifiers and idempotent upsert). It then prints restored instead of created:

bash
$ dash0 dashboards create -f dashboard.yaml
Dashboard "My Dashboard" restored

Aliases: add

update

Update an existing asset from a YAML or JSON file. If the ID argument is omitted, the ID is extracted from the file content. The output shows a unified diff of what changed. The --dry-run flag shows the diff without applying the update.

The diff is computed semantically, not as a raw text diff: cosmetic differences, such as key order, duration formatting (2m vs. 2m0s), int-vs-float representation, and API-populated defaults absent from the local file, never produce a spurious "changed" result. See diff for what the comparison does and does not normalize.

bash
dash0 dashboards update [id] -f <file> [--dry-run]

Update a dashboard from a file:

bash
$ dash0 dashboards update <id> -f dashboard.yaml
--- Dashboard (before)
+++ Dashboard (after)
@@ -2,7 +2,7 @@
 spec:
   display:
-    name: Old Dashboard Name
+    name: New Dashboard Name

Preview changes without applying:

bash
$ dash0 dashboards update -f dashboard.yaml --dry-run
--- Dashboard (before)
+++ Dashboard (after)
@@ -2,7 +2,7 @@
 spec:
   display:
-    name: Old Dashboard Name
+    name: New Dashboard Name

When nothing changed:

bash
$ dash0 dashboards update -f dashboard.yaml
Dashboard "My Dashboard": no changes

update on a deleted asset brings it back. It prints restored, followed by a diff of any other fields that changed:

bash
$ dash0 dashboards update -f dashboard.yaml
Dashboard "New Dashboard Name" restored
--- Dashboard (before)
+++ Dashboard (after)
@@ -2,7 +2,7 @@
 spec:
   display:
-    name: Old Dashboard Name
+    name: New Dashboard Name

With --dry-run, the asset stays deleted. The output is the same, with would be restored instead of restored. The diff never shows the dash0.com/deleted-at annotation, so a file exported with get -o yaml while the asset was deleted also works. If the API saves the asset but still shows it as deleted, apply, create, and update fail with an error. apply then lists that asset under Applied before error.

delete

Delete an asset by ID. Prompts for confirmation unless --force is passed.

bash
dash0 dashboards delete <id> [--force]

Interactive deletion (prompts for confirmation):

bash
$ dash0 dashboards delete a1b2c3d4-5678-90ab-cdef-1234567890ab
Are you sure you want to delete dashboard "a1b2c3d4-..."? [y/N]: y
Dashboard "a1b2c3d4-..." deleted

Non-interactive deletion (--force skips the prompt):

bash
$ dash0 dashboards delete a1b2c3d4-5678-90ab-cdef-1234567890ab --force
Dashboard "a1b2c3d4-..." deleted

With --force, an already-deleted asset is treated as success (exit 0) — a short "already deleted" line is printed to stderr and the command returns without error. This makes delete --force safe to run from CI/CD and agent-driven pipelines where the asset may have been removed concurrently by another actor:

bash
$ dash0 dashboards delete a1b2c3d4-5678-90ab-cdef-1234567890ab --force
Dashboard "a1b2c3d4-5678-90ab-cdef-1234567890ab" was already deleted
$ echo $?
0

Without --force, an asset that is genuinely missing surfaces as a non-zero exit with a "not found" error. Most Dash0 delete endpoints rarely reach that branch, though, because they answer a missing asset with 2xx rather than 404. For dashboards, check-rules, views, spam-filters, time-series-aggregations, and datasets, delete <typo> therefore exits 0 whether or not you pass --force. For datasets, a mistyped slug prints Dataset "<typo>" deleted, and no dataset is deleted. The CLI does not preflight with a GET to close that gap, because one command that did would be the only one to error on a missing asset.

The idempotent behavior applies uniformly to every delete subcommand (dashboards, check-rules, synthetic-checks, views, recording-rules, notification-channels, spam-filters, time-series-aggregations, signal-to-metrics-rules, teams, datasets) as well as the remove-shaped variants (members remove, teams remove-members). In the multi-target remove variants the check runs per member, so one concurrently-removed member does not fail the whole --force call — the loop keeps going. See also the Non-interactive deletion (for automation) workflow.

Aliases: remove

Asset type quick reference

Asset typeCommandNotes
Dashboardsdash0 dashboards <subcommand>create also accepts PersesDashboard CRD files
Check rulesdash0 check-rules <subcommand>create also accepts PrometheusRule CRD files
Synthetic checksdash0 synthetic-checks <subcommand>
SLOsdash0 slos <subcommand>Dataset-scoped; documents use apiVersion: openslo.com/v1, kind: SLO — a supported subset of OpenSLO v1 with a domain-qualified apiVersion, not upstream-identical
Evalsdash0 --experimental evals <subcommand>Experimental. Dataset-scoped generative AI evaluations; kind: Dash0GenerativeAiEvaluation; metadata.labels["dash0.com/origin"] is the upsert key. See Eval documents
Viewsdash0 views <subcommand>
Recording rulesdash0 recording-rules <subcommand>Uses PrometheusRule CRD format
Notification channelsdash0 notification-channels <subcommand>Organization-level (no --dataset)
Spam filtersdash0 --experimental spam-filters <subcommand>Experimental. Dataset-scoped; create/update accept v1alpha1 (spec.contexts) and v1alpha2 (spec.context)
Time series aggregationsdash0 time-series-aggregations <subcommand> (alias tsa)Dataset-scoped. Every endpoint requires the organization admin role. metadata.labels["dash0.com/origin"] is mandatory and is the only upsert key
Signal-to-metrics rulesdash0 signal-to-metrics-rules <subcommand> (alias s2m)Dataset-scoped. kind: Dash0SignalToMetrics; metadata.labels["dash0.com/origin"] is the upsert key. Also has test, which counts the signals a rule matches without creating it; see Signal-to-metrics rules
Datasetsdash0 --experimental datasets <subcommand>Organization-level (no --dataset). Experimental. create and apply need a slug in metadata.labels["dash0.com/id"] or spec.slug. Deleting a dataset keeps its dashboards, check rules, synthetic checks, and views for 30 days; see datasets delete
AWS metric scrape configsdash0 --experimental aws-metric-scrape-configs <subcommand>Organization-level (no --dataset). Experimental. Only get, update, and delete: each AWS integration has exactly one config, addressed by the integration id, so there is no list or create. delete clears the config and keeps the integration
Agent0 skillsdash0 --experimental agent0 skills <subcommand>Organization-level (no --dataset). Experimental. kind: Dash0Skill; metadata.labels["dash0.com/origin"] is the upsert key, and the skill name comes from the SKILL.md frontmatter
Teamsdash0 --experimental teams <subcommand>Organization-level (no --dataset). Experimental. create accepts -f <file> for a declarative TeamDefinitionV1Alpha1 document, or a positional <name> for the imperative form. spec.members and --member accept either an email address or an internal member id; the server resolves emails.

Asset identifiers and idempotent upsert

Every asset type accepts a user-defined identifier in its YAML/JSON document. When the identifier is present, both create and apply perform an upsert (PUT) against that identifier: the asset is created on the first call and replaced on every subsequent call. When the identifier is absent, both commands perform a plain create (POST) and the server assigns a fresh ID on each invocation — repeated runs produce duplicate assets.

Pinning a stable identifier in the source document is the supported way to make apply and create idempotent, which is what GitOps and CI/CD workflows need.

If the CLI reports an invalid API response after a create or update, the server may already have applied the write. Check the asset in Dash0 before retrying: a document without an identifier can create a second asset even though the first invocation reported an error. The error identifies the asset type and endpoint, includes decoding details when available, and warns about this possibility for POST and PUT responses.

For dashboards, check rules, views, synthetic checks, recording rules, spam filters, notification channels, and teams addressed by origin, a preliminary GET supplies the existing state for reporting; a failed GET still allows the PUT to proceed. This lets a valid local document replace an asset whose current response cannot be decoded, although the CLI cannot show a before/after diff when that read fails. Existing stricter preflights remain in effect: SLO preflights stop on errors other than 404, and reads that determine whether to POST or PUT (such as teams addressed by ID and datasets) also stop on non-404 errors.

The identifier field location varies by asset kind:

KindIdentifier fieldNotes
Dashboardmetadata.dash0Extensions.id
PersesDashboardmetadata.labels["dash0.com/id"]
CheckRuletop-level id
PrometheusRule (alerting rules)metadata.labels["dash0.com/id"]For a single-alert CRD, this label is the alert's check-rule id directly. For a CRD with two or more alerting rules, each alert gets its own derived id (the CRD's label plus a slug of the alert's own composed name) instead of sharing the CRD's label directly — see Multi-alert PrometheusRule CRDs
PrometheusRule (recording rules)metadata.labels["dash0.com/id"]
SyntheticCheckmetadata.labels["dash0.com/id"]
SLOmetadata.labels["dash0.com/origin"] (metadata.labels["dash0.com/id"] when origin is absent)OpenSLO v1 document (apiVersion: openslo.com/v1). SLO IDs are server-assigned (slo_<ulid>), so dash0.com/origin is the only client-settable upsert key and the recommended one. dash0.com/origin is preferred and upserts by that origin (PUT). When only dash0.com/id is present the CLI preflights GET /api/slos/{id}: on hit it PUTs (idempotent update — this is what makes reapplying a YAML downloaded from the Dash0 platform UI a no-op), on 404 it falls back to POST so a YAML from one organization applies to another as a fresh create, and other errors surface. That POST fallback is not idempotent: the server assigns a new ID that the document does not carry, so each further apply POSTs again and creates another SLO — pin dash0.com/origin for any SLO applied more than once. A document with neither label creates a new SLO on every apply
Viewmetadata.labels["dash0.com/id"]
Dash0GenerativeAiEvaluationmetadata.labels["dash0.com/origin"] (metadata.labels["dash0.com/id"] when origin is absent)Eval (experimental). Eval IDs are server-assigned, so dash0.com/origin is the recommended key. PUT /api/generative-ai-evaluations/{origin} creates the eval when the origin is new, replaces it otherwise, and restores it when it was deleted. When only dash0.com/id is present the CLI preflights GET /api/generative-ai-evaluations/{id}: on hit it PUTs, on 404 it falls back to POST (a one-way create, like SLOs), and other errors surface. A document with neither label creates a new eval on every apply
Dash0SpamFilter (v1alpha1 and v1alpha2)metadata.labels["dash0.com/id"]metadata.labels["dash0.com/origin"] is preferred over the ID when both are present; an ID-only filter is not fully idempotent because the server reassigns the ID on the first PUT. This also affects apply --since: since the id recorded in git history may no longer match the live filter's reassigned id, deleting an ID-only spam filter by that stale id can miss the real live filter — apply --since prints a warning before deleting an ID-only spam filter for this reason. Use dash0.com/origin for spam filters you intend to manage with --since
Dash0TimeSeriesAggregationmetadata.labels["dash0.com/origin"]Mandatory. The API rejects an aggregation that has no origin, so there is no server-assigned id to fall back to. A dash0.com/id in the document body is ignored, because the server reads the origin from the URL path, so an exported definition reapplies cleanly. Origins are unique per organization while each aggregation belongs to exactly one dataset, so you cannot apply one document to two datasets. See apply
Dash0SignalToMetricsmetadata.labels["dash0.com/origin"] (metadata.labels["dash0.com/id"] when origin is absent)Signal-to-metrics rule IDs are server-assigned, so dash0.com/origin is the key to pin. PUT /api/signal-to-metrics/{origin} creates the rule when the origin is new and replaces it otherwise. When only dash0.com/id is present the CLI preflights GET /api/signal-to-metrics/{id}: on hit it PUTs, on 404 it POSTs without the ID, so a definition exported from another organization applies as a new rule. That fallback is not idempotent: a further apply POSTs again. A document with neither label creates a new rule on every apply. As for time series aggregations, origins are unique per organization while each rule belongs to one dataset, so you cannot apply one document to two datasets
Dash0NotificationChannelmetadata.labels["dash0.com/origin"]There is no user-settable ID field for notification channels — the origin label is the upsert key. A document without it creates a new channel on every apply
Dash0Datasetspec.slug, or metadata.labels["dash0.com/id"] when spec.slug is absent (the dataset slug)Organization-level. The slug is required, is the only identifier, and cannot change after creation. dash0.com/origin is optional and also works as the identifier in the API path. The CLI preflights GET /api/datasets/{slug}: on hit it PUTs, on 404 it POSTs, and other errors surface. create and apply therefore create a dataset for a slug that does not exist yet, so a mistyped slug creates a new dataset; datasets update fails with "not found" instead.
Dash0AwsMetricScrapeConfigmetadata.labels["dash0.com/id"] (the AWS integration's id)Organization-level. Every AWS integration has exactly one scrape config, so the integration id is the only identifier and is required. apply always replaces the whole config (PUT); there is no create. dash0.com/origin is ignored: the CLI does not send it
Dash0Skillmetadata.labels["dash0.com/origin"] (metadata.labels["dash0.com/id"] when origin is absent)Organization-level Agent0 custom skill. dash0.com/origin is the upsert key: PUT /api/agent0/custom-skills/{origin} creates the skill when the origin is new and replaces it otherwise. Use a dash0-cli_ prefix so Dash0 shows the skill as managed by the CLI. When only dash0.com/id is present the CLI preflights GET /api/agent0/custom-skills/{id}: on hit it PUTs, on 404 it fails instead of creating, because the id is server-assigned. A document with neither label creates the skill with POST; the skill name, from the SKILL.md frontmatter, is unique per organization, so a second apply fails with a name collision instead of creating a duplicate
Dash0Teammetadata.labels["dash0.com/origin"] (metadata.labels["dash0.com/id"] when origin is absent)Organization-level. dash0.com/origin is preferred and upserts by that origin (PUT). When the document carries both labels and the origin is not found but the id is, the CLI updates the team at the id, so an exported SSO/SCIM team (origin saml://...) does not become a second team. When only dash0.com/id is present the CLI preflights GET /api/teams/{id}: on hit it PUTs (idempotent update — this is what makes reapplying a YAML downloaded from the Dash0 platform UI a no-op), on 404 it falls back to POST so cross-org apply stays idempotent, and other errors surface. A document with neither label creates a new team on every apply. spec.members accepts email addresses or internal member ids interchangeably

The dash0.com/id label is the user-defined external identifier and is distinct from dash0.com/origin, which records the system of record (dash0-cli, terraform, ui, operator). Which of the two is the upsert key depends on the asset kind, and the split is not an exception list — it follows the shape of the underlying API.

For the kinds whose API is built around API-managed resources — notification channels, spam filters, SLOs, evals, signal-to-metrics rules, teams, and Agent0 skills — dash0.com/origin is the upsert key: the CLI reads the origin label off the document and uses it in the request path (PUT /api/notification-channels/{origin}, PUT /api/spam-filters/{origin}, PUT /api/slos/{origin}, PUT /api/generative-ai-evaluations/{origin}, PUT /api/signal-to-metrics/{origin}, PUT /api/teams/{origin}, PUT /api/agent0/custom-skills/{origin}). Notification channels have no user-settable ID field at all, and for SLOs origin is not merely accepted but the recommended key: the server assigns SLO IDs (slo_<ulid>), so a hand-written document can only be made idempotent through dash0.com/origin.

For the remaining kinds — views, check rules, recording rules, and synthetic checks — the server treats origin as provenance only, so the CLI strips dash0.com/origin from outbound payloads and upserts against dash0.com/id (or the kind's equivalent ID field) instead. Stripping origin keeps an apply from claiming ownership of an asset that Terraform or the Kubernetes operator manages. Dashboards are a third case: they use metadata.dash0Extensions.id, and the sibling metadata.dash0Extensions.origin field is deprecated in favor of it, so never use origin as a dashboard upsert key.

When list -o yaml or get -o yaml exports an existing asset, the server-assigned ID is rendered into the correct field, so the export-edit-reapply workflow round-trips through the identifier automatically.

Multi-alert PrometheusRule CRDs

A PrometheusRule CRD's dash0.com/id label is the CRD's own identifier, not one specific alert's. For a single alerting rule, that label unambiguously names its one check rule, so it's used verbatim. For two or more alerting rules, each one instead gets its own identifier: the CRD's label, plus --, plus a slug of that alert's own composed name (<group name> - <alert name>, lowercased, with every run of non-alphanumeric characters collapsed to a single hyphen). For example, a CRD labeled dash0.com/id: app-rules with alerts HighErrorRate and DiskFull in a group named test-group upserts check rules app-rules--test-group-higherrorrate and app-rules--test-group-diskfull.

This derivation exists because upsert is PUT (create-or-replace), and the CRD-level label is the only identifier a multi-alert CRD has to work with — reusing it verbatim for every alert would upsert them all to the exact same check rule, so only the last alert applied in document order would end up with a real check rule at all, silently losing every other one. The derived id is stable across repeated applies of unchanged content (neither the CRD's label nor an unrenamed alert's composed name changes) and across reordering the CRD's rules (it depends on the alert's name, not its position), so upsert idempotency holds the same way it does for a single-alert CRD. Renaming an alert changes its derived id, the same way --since already treats a renamed alert as a delete-and-recreate (see apply --since's PrometheusRule CRD handling) — there is no separate, more stable identity for one alert within a CRD to fall back to.

Note

If a multi-alert CRD with a dash0.com/id label was applied before this derivation existed, its literal dash0.com/id held whichever alert last applied under the old, colliding behavior. Re-applying that CRD now creates a fresh check rule per alert at each alert's own derived id, and leaves the old check rule at the literal dash0.com/id untouched — it becomes an orphaned duplicate. Delete it by hand (dash0 check-rules delete <dash0.com/id>) once the new per-alert check rules look correct.

PrometheusRule annotation merge

A PrometheusRule document's top-level metadata.annotations are merged into each alerting rule's own annotations, key by key. A rule that sets the same key wins for that key only, and still inherits the rest. Use this to define a common setting once instead of repeating it on every rule in a multi-rule CRD. The recurring example is dash0.com/notification-channel-ids, whose value is a comma-separated list of notification channel ids (dash0 notification-channels list prints the available ids). This applies to check-rules create, apply, and check-rules update, though update operates on a single check rule and rejects a CRD containing more than one.

Below, CheckoutHighLatency inherits the top-level channel and CheckoutHighErrorRate replaces it with its own:

yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: checkout-alerts
  annotations:
    dash0.com/notification-channel-ids: ded5721c-2bf0-4a10-ab33-511fef734b0f
spec:
  groups:
    - name: Alerting
      rules:
        - alert: CheckoutHighLatency
          expr: histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_seconds_bucket{service_name="checkout"}[5m]))) > 1
        - alert: CheckoutHighErrorRate
          expr: sum(rate(http_server_request_duration_seconds_count{service_name="checkout", http_response_status_code=~"5.."}[5m])) > 0.1
          annotations:
            dash0.com/notification-channel-ids: 56aaacb2-10c6-4cef-8aeb-d7c862ad863e
bash
$ dash0 check-rules create -f checkout-alerts.yaml
Check rule "Alerting - CheckoutHighLatency" created
Check rule "Alerting - CheckoutHighErrorRate" created

CheckoutHighLatency declared no annotations of its own and still carries the top-level channel:

bash
$ dash0 check-rules get a1b2c3d4-5678-90ab-cdef-1234567890ab -o yaml
annotations:
  dash0.com/notification-channel-ids: ded5721c-2bf0-4a10-ab33-511fef734b0f
enabled: true
expression: histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_seconds_bucket{service_name="checkout"}[5m])))
  > 1
id: a1b2c3d4-5678-90ab-cdef-1234567890ab
name: Alerting - CheckoutHighLatency
...

Annotations that control rule behavior

A few annotations configure how a rule evaluates rather than describing it:

AnnotationControlsAlso accepted
dash0-enabledwhether the rule evaluates at all
dash0-threshold-criticalthe critical thresholdthreshold-critical
dash0-threshold-degradedthe degraded thresholdthreshold-degraded

These are unprefixed, unlike the dash0.com/-prefixed annotations above, so they are easy to mistake for ordinary metadata. They inherit and override like any other annotation, so a value set at the top level reaches every rule that does not name its own. Setting dash0-enabled: "false" there stops all of those rules from firing:

yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: checkout-defaults
  annotations:
    dash0-enabled: "false"
    dash0-threshold-critical: "5"
spec:
  groups:
    - name: Alerting
      rules:
        - alert: InheritsDisabled
          expr: up == 0
        - alert: OverridesToEnabled
          expr: up == 1
          annotations:
            dash0-enabled: "true"
            dash0-threshold-critical: "9"

The critical and degraded thresholds are two separate annotations, so a document can set one at the top level and a rule can set the other. Both then apply to that rule. Below, the rule inherits a critical threshold of 1000 milliseconds and sets a degraded threshold of 500 milliseconds:

yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: checkout-latency
  annotations:
    dash0-threshold-critical: "1000"
spec:
  groups:
    - name: Alerting
      rules:
        - alert: Checkout P99 Latency
          expr: histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_seconds_bucket{service_name="checkout"}[5m]))) * 1000 > $__threshold
          annotations:
            dash0-threshold-degraded: "500"
bash
$ dash0 check-rules get c3d4e5f6-7890-12cd-ef01-345678901bcd -o yaml
id: c3d4e5f6-7890-12cd-ef01-345678901bcd
name: Alerting - Checkout P99 Latency
...
thresholds:
  degraded: 500
  failed: 1000

The check then reports critical above 1000 milliseconds, degraded between 500 and 1000 milliseconds, and healthy below 500 milliseconds. A measurement that crosses both thresholds is reported as critical, never as both.

Dash0 evaluates the critical threshold first, so the critical value has to be the more severe one for the comparison used in the expression: the higher number for >, the lower number for <. Swapping them in the rule above, to a critical threshold of 500 and a degraded threshold of 1000, reports critical from 500 milliseconds upwards and never reports degraded at all.

The prefixed and unprefixed spellings of a setting are different annotation keys, and the prefixed one wins wherever both are present. That takes precedence over the rule-beats-document behavior above: a rule setting threshold-critical does not override a top-level dash0-threshold-critical. The losing value is not discarded either, it stays on the check rule as an ordinary annotation, which is usually how you notice. Use one spelling throughout a document.

apply

Apply asset definitions from a file, directory, or stdin. If an asset already exists (matched by ID), it is updated; otherwise it is created.

bash
dash0 apply -f <file|directory> [--dry-run] [--since <ref> [--force] [--accept-non-ancestor-ref]]
FlagShortDescription
--file-fPath to a YAML/JSON file, a directory, or - for stdin
--dry-runValidate without applying
--since[experimental] Delete assets removed from -f's contents since this git ref (requires --experimental/-X)
--forceSkip the confirmation prompt for deletions triggered by --since; also accepts a non-ancestor --since ref
--accept-non-ancestor-refAccept a non-ancestor --since ref on its own, without also skipping the per-deletion confirmation prompt

For assets that are updated, a unified diff of the changes is shown. Assets that are created show the standard creation message. A document whose identifier belongs to a deleted asset brings that asset back. It shows restored, followed by a diff of any other fields that changed.

When a directory is specified, all .yaml and .yml files are discovered recursively. Hidden files and directories (starting with .) are skipped, except for the directory passed to -f itself — a dot-prefixed target (e.g. -f .dash0-assets/) is a deliberate choice and is scanned normally. All documents are validated before any are applied. If any document fails validation, no changes are made.

Supported kind values: Dashboard, PersesDashboard, CheckRule, PrometheusRule, SyntheticCheck, SLO, View, Dash0SpamFilter, Dash0NotificationChannel, Dash0Dataset, Dash0Team, Dash0TimeSeriesAggregation, Dash0SignalToMetrics, Dash0Skill, Dash0AwsMetricScrapeConfig, Dash0GenerativeAiEvaluation. Dash0AuthToken is not supported yet and fails validation: the API returns a new token's secret only once, and apply has no safe place to deliver it. Use auth-tokens create instead. A single file may contain multiple documents separated by ---.

For Dash0SpamFilter, the apiVersion field on the document selects the schema (v1alpha1 or v1alpha2); a missing value defaults to v1alpha1. An unknown value fails validation up front, before any document is applied.

For PrometheusRule, apply inspects each rule entry and dispatches by type. Alerting rules (entries with alert:) are sent to the check-rule endpoint as one check rule per alert, named <group name> - <alert name> to match the Dash0 Kubernetes operator and the Terraform provider (see PrometheusRule annotation merge). Recording rules (entries with record:) are sent to the recording-rule endpoint as a single PrometheusRule CRD with the alerting rules removed. A CRD that mixes both kinds is dispatched to both endpoints in a single apply. A CRD that contains no alerting and no recording rules fails validation up front.

Two check rules in one run that resolve to the same ID fail validation up front, because only the last one applied would be kept. This covers CheckRule documents and the per-alert IDs of PrometheusRule CRDs, in one file or across files.

Dash0NotificationChannel documents are dispatched to the organization-level notification-channels endpoint and are not associated with a dataset. The dash0.com/origin label is the upsert key when present; otherwise the server assigns a fresh ID on each apply. spec.routing.assets is API-managed: the API populates it as a back-reference when a check rule or synthetic check binds to the channel, and ignores any value supplied on write. Exported definitions never carry the field (get/list omit it from -o yaml/-o json output). The CLI warns when an applied document carries a non-empty spec.routing.assets. To bind a check rule, set the dash0.com/notification-channel-ids annotation on the check rule; to bind a synthetic check, set spec.notifications.channels on the synthetic check.

SLO IDs are assigned by the server (slo_<ulid>), so dash0.com/id cannot be chosen up front. That makes dash0.com/origin the only key a hand-authored SLO document can pin, and the recommended one to use. dash0.com/origin wins when present and PUTs unconditionally (create-or-replace at that origin). When only dash0.com/id is present the CLI preflights the SLO with a GET — on hit it PUTs (idempotent update, the path that makes a UI-downloaded YAML reapply cleanly), on 404 it falls back to POST so a YAML from one organization applies to another as a fresh create, and other preflight errors surface instead of silently creating a duplicate. On that POST fallback the foreign dash0.com/id is removed from the request body, since the server assigns the ID. The fallback is therefore a one-way create, not an idempotent one: the newly assigned ID is not written back into the document, so a second apply preflights the same unknown ID, 404s again, and POSTs a second SLO. Pin dash0.com/origin on any SLO that will be applied more than once, including every cross-organization apply. A document with neither label creates a new SLO on every apply.

Dash0GenerativeAiEvaluation documents are evals, dispatched to the dataset-scoped generative AI evaluations endpoint. dash0.com/origin is the upsert key, with dash0.com/id as the fallback, the same as for SLO documents above. See Eval documents for the fields the CLI removes before it writes and the fields that cannot change after create.

Dash0Dataset documents are dispatched to the organization-level datasets endpoint (not associated with a dataset). The slug, in spec.slug or metadata.labels["dash0.com/id"], is required: a document without it fails during the validation phase, before any document in the run is applied. So does a document whose apiVersion is missing or not dash0.com/v1alpha1. The CLI preflights the dataset with a GET — on hit it PUTs, on 404 it POSTs. Creating a dataset with the slug of a dataset deleted in the last 30 days restores that dataset: a view created in it before the delete is back after the create. Only the creation time and the version reset, and the settings come from the request. apply prints created for a restore, as it does for a new dataset. apply applies Dash0Dataset documents before every other kind, whatever the file order, because the API rejects an asset whose dataset does not exist yet. A dataset document has no telemetry filters: spam filters own them, and creating or updating a dataset never changes them. apply --since deletes a dataset whose document was removed from git, like any other kind (see apply --since).

Dash0Skill documents are Agent0 custom skills, dispatched to the organization-level custom skills endpoint (not associated with a dataset). A document without a SKILL.md file in spec.files fails during the validation phase. dash0.com/origin is the upsert key, with dash0.com/id as an update-only fallback (see Asset identifiers and idempotent upsert). apply never sends spec.source, metadata.annotations["dash0.com/enabled"], or the server-managed metadata.name, version, and timestamps, so a get -o yaml export applies as is. spec.permissions is sent as written, defaultEnabled included; when it is absent, the stored grants stay unchanged. The admin grant the server adds to every skill is left out of the request and the diff, unless it sets defaultEnabled: false. A skill name already used by another skill, and a defaultEnabled the caller may not change, fail with an error that names the cause and the fix.

Dash0Team documents are dispatched to the organization-level teams endpoint (also not associated with a dataset). Upsert key selection: dash0.com/origin wins when present and PUTs at that origin. When the document also carries dash0.com/id and the origin is not found, the CLI reads the team by its id, and on hit it PUTs at the id. This keeps an exported SSO/SCIM-provisioned team, whose saml://... origin the teams endpoint cannot resolve, from being created a second time. When only dash0.com/id is present the CLI preflights the team with a GET — on hit it PUTs (idempotent update, the path that makes a UI-downloaded YAML reapply cleanly), on 404 it falls back to POST so a YAML from one organization applies to another as a fresh create, and other preflight errors surface instead of silently creating a duplicate. A document with neither label creates a new team on every apply. spec.members accepts either email addresses (recommended for GitOps) or internal member ids; the server resolves emails during reconciliation and rejects unresolvable ones with a single 400 listing every offender. Requires --experimental.

Dash0TimeSeriesAggregation documents are dispatched to the dataset-scoped time series aggregations endpoint. metadata.labels["dash0.com/origin"] is mandatory: a document without it fails during the validation phase, before any document in the run is applied. Every call requires the organization admin role. The CLI does not check the role before it starts, so a non-admin token fails partway through the apply instead of during validation. In a directory that holds an aggregation next to other kinds, the run stops at the aggregation. Whatever applied before it stays applied, and the CLI never attempts the kinds ordered after it. Grant the admin role, or keep aggregations in their own -f target, so a role failure cannot half-apply the rest of the directory.

Important

Time series aggregation origins are unique per organization, while each aggregation belongs to exactly one dataset. You therefore cannot apply one document to two datasets, as you can for every other asset kind. The second apply fails with 400 ... associated with a different dataset, and the CLI adds a hint naming the organization-wide origin namespace. Use a distinct origin per dataset, for example http-server-request-duration-staging.

Dash0SignalToMetrics documents are signal-to-metrics rules, dispatched to the dataset-scoped signal-to-metrics endpoint. dash0.com/origin wins when present: the CLI PUTs to that origin, which creates the rule or replaces it. When only dash0.com/id is present the CLI preflights the rule with a GET: on hit it PUTs to that ID, on 404 it POSTs without the ID, and other preflight errors surface. The POST fallback lets a definition exported from another organization apply, but it is not idempotent, because the new ID is never written back into the document. A document with neither label creates a new rule on every apply. Pin dash0.com/origin on any rule that will be applied more than once. Origins are unique per organization while each rule belongs to one dataset, as for time series aggregations. The GET finds a rule whatever --dataset says, so the CLI compares the stored rule's dataset with --dataset before it writes. Applying a document to a second dataset therefore fails with an error that names the rule's dataset, before anything is written, and diff reports the same error instead of "No differences". Use a distinct origin per dataset.

Dash0AwsMetricScrapeConfig documents replace the CloudWatch metric scrape config of the AWS integration named by metadata.labels["dash0.com/id"]. They are organization-level: the integration decides the dataset, and --dataset is not sent. These checks run during the validation phase, before any document in the run is applied:

  • A document without dash0.com/id fails, because there is nothing to address it by.
  • A missing or null spec.namespaces fails, because the API would read it as [] and stop all scraping. Write namespaces: [] to stop scraping on purpose.
  • An unknown field under spec fails, so a misspelled key is not silently dropped.
  • A label or annotation that the API ignores prints a warning. The labels and annotations that aws-metric-scrape-configs get -o yaml exports are not warned about.

The CLI does not send dash0.com/origin, so it never claims ownership of a config. Dash0 keeps the origin of the first writer until the config is cleared. apply prints created when the integration had no config before, and a diff otherwise.

Note

The -f flag accepts a single path. Do not use shell glob patterns like -f assets/* — the shell expands the glob into multiple arguments and only the first file is passed to -f. Use -f assets/ (the directory) instead.

Apply a single file:

bash
$ dash0 apply -f dashboard.yaml
Dashboard "Production Overview" (a1b2c3d4-...) created

Apply a directory recursively. Each line is prefixed with the file's path relative to -f's own target, not the shell's current directory — a nested assets/dashboards/dashboard.yaml would print as dashboards/dashboard.yaml here:

bash
$ dash0 apply -f assets/
dashboard.yaml: Dashboard "Production Overview" (a1b2c3d4-...) created
rule.yaml: Check rule "High Error Rate" (b2c3d4e5-...) updated
...

Apply from stdin (the cat … | dash0 apply -f - pipeline counts as one command):

bash
$ cat assets.yaml | dash0 apply -f -
Dashboard "Production Overview" (a1b2c3d4-...) created
...

Dry-run validation:

bash
$ dash0 apply -f assets.yaml --dry-run
Dry run: 1 document validated
  * Apply Dashboard "Production Overview" (a1b2c3d4-5678-90ab-cdef-1234567890ab)

apply --since (experimental)

--since <ref> turns apply into a full GitOps sync, not just create/update: it additionally deletes any asset whose definition existed in -f's scanned scope at <ref> but is no longer present in the current contents. <ref> accepts any revision expression git itself accepts — a commit SHA, a branch or tag name, or a relative expression like HEAD~1 — and -f's target must be inside a git repository (a single file or a directory both work).

Deletion detection is by identifier — the asset's dash0.com/id or dash0.com/origin, per the asset identifiers table — never by file path, so moving or renaming a file within the scanned scope is not a deletion. --since requires --experimental/-X. apply itself is not gated: every other flag, including --dry-run, is completely unaffected when --since is not passed.

Preview a --since deletion without applying anything. The deletion is merged into the same per-file --dry-run listing used for creates and updates, sorted by identifier within each file:

bash
$ dash0 --experimental apply -f dashboards/ --since HEAD~1 --dry-run
Dry run: 1 document from 1 file validated; 1 deletion pending due to --since 'HEAD~1'
  keep.yaml
    * Apply Dashboard "Production Overview" (a1b2c3d4-5678-90ab-cdef-1234567890ab)
  removed.yaml
    * Delete Dashboard "Old Dashboard" (b2c3d4e5-6789-01bc-def0-234567890abc)

A deleted asset's name is resolved by reading its content from git history at <ref>; if that lookup fails, <name> is shown as a placeholder instead. In agent mode, --dry-run reports the same information as JSON: an array of {path, changes: [{op, kind, name, originOrId, since}]}, op being "apply" or "delete", kind the asset's display kind (e.g. "View", "Dashboard"), and since the --since ref that determined the change (present only for op: "delete", since an "apply" row comes from -f's current contents, not from any ref).

Apply for real, deleting assets removed since <ref>. Each deletion prompts for confirmation, the same as a standalone <kind> delete:

bash
$ dash0 --experimental apply -f dashboards/ --since HEAD~1
keep.yaml: Dashboard "Production Overview" (a1b2c3d4-...) created
Are you sure you want to delete Dashboard "Old Dashboard" (b2c3d4e5-...), removed since --since ref? [y/N]: y
Dashboard "Old Dashboard" (b2c3d4e5-...) deleted

Skip the confirmation prompt (for CI/CD and agent-driven pipelines, where there is no terminal to answer it):

bash
dash0 --experimental apply -f dashboards/ --since HEAD~1 --force

If an asset --since planned to delete is already gone by the time the confirmed deletion runs — someone deleted it directly in the Dash0 UI, for example — that is treated as the desired end state already reached, regardless of --force. This is unconditional (unlike a standalone <kind> delete, whose own --force flag gates the same idempotent-404 tolerance): --since's job is reconciling Dash0 to match git across a whole scanned scope, and one asset a concurrent change already removed matching that goal is not a reason to fail the run, confirmed or not. --force still controls only whether the confirmation prompt itself is skipped:

bash
$ dash0 --experimental apply -f dashboards/ --since HEAD~1
keep.yaml: Dashboard "Production Overview" (a1b2c3d4-...) created
Are you sure you want to delete Dashboard "Old Dashboard" (b2c3d4e5-...), removed since --since ref? [y/N]: y
Dashboard "Old Dashboard" was already deleted
$ echo $?
0

Declining a deletion does not stop the rest of the run — creates and updates for the surviving documents still go through — but the command exits non-zero, since the sync's desired end state ("this asset is gone, matching git") was not reached:

bash
$ dash0 --experimental apply -f dashboards/ --since HEAD~1
keep.yaml: Dashboard "Production Overview" (a1b2c3d4-...) created
Are you sure you want to delete Dashboard "Old Dashboard" (b2c3d4e5-...), removed since --since ref? [y/N]: n
Dashboard "Old Dashboard" (b2c3d4e5-...): deletion declined
$ echo $?
1

Two --since values get a dedicated, CI-agnostic error message instead of a generic git-resolution failure, since both are common results of imperfect GitHub Actions wiring rather than a typo'd ref:

  • The empty string (--since "") — the value a quoted --since "${{ github.event.before }}" interpolates to on trigger types that don't define before (e.g. workflow_dispatch, schedule).
  • Git's all-zeros SHA sentinel (0000000000000000000000000000000000000000) — the value GitHub gives github.event.before on a branch's first push.

Both errors recommend skipping --since for that invocation, or passing an explicit ref.

A ref written as <base>~N or <base>^N (including the bare <base>~/<base>^ shorthand for N=1) whose base resolves fine, but whose own history has fewer than N+1 commits — --since HEAD~1 against a fresh, single-commit repository, for example, the first thing many people try when setting up a test or demo repository for --since — names that specifically, rather than suggesting a typo or a too-shallow clone:

bash
$ dash0 --experimental apply -f dashboards/ --since HEAD~1 --dry-run
Error: --since 'HEAD~1' could not be resolved: "HEAD" has only 1 commit of history, not enough for "HEAD~1" to resolve 1 commit further back
Hint: pass a ref that exists this far back in the repository's history, or skip --since for this invocation

Any other unresolvable ref (a genuine typo, a too-shallow clone) still surfaces the generic suggestion instead, since git's own error text for those cases doesn't distinguish the reason on its own:

bash
$ dash0 --experimental apply -f dashboards/ --since bogus-ref --dry-run
Error: --since 'bogus-ref' could not be resolved
Hint: check the ref for a typo; if this is a shallow clone (actions/checkout defaults to fetch-depth: 1), re-run the checkout with fetch-depth: 0 so the ref's history is available

-f's target not being inside a git repository at all gets a direct, single-sentence error rather than git's own nested plumbing failure:

bash
$ dash0 --experimental apply -f /tmp/assets/ --since HEAD~1 --dry-run
Error: --since 'HEAD~1' requires /tmp/assets/ to be inside a git repository, but it is not (no .git found there or in any parent directory)
Hint: point -f at a path inside the repository that tracks these assets, or drop --since to apply without deletion detection

A --since ref that resolves to a real commit but is not an ancestor of the current commit — the result of a force-push or history rewrite on the tracked branch — prints a warning naming the likely cause, then goes through the same per-asset confirmation as any other deletion. It does not hard-fail, so a legitimate force-push still has a recovery path:

bash
$ dash0 --experimental apply -f dashboards/ --since <orphaned-sha> --force
warning: --since '<orphaned-sha>' is not an ancestor of HEAD (likely a force-push or history rewrite); deletion detection may be inaccurate
keep.yaml: Dashboard "Production Overview" (a1b2c3d4-...) created
Dashboard "Old Dashboard" (b2c3d4e5-...) deleted

--force accepts the doubtful ref and skips every per-asset deletion confirmation together, since it always meant "run unattended" end to end. These are two separate decisions, though: accepting a ref that might be from a force-push is not the same as wanting no further prompts at all. --accept-non-ancestor-ref answers only the first one, leaving the per-asset confirmation in place:

bash
$ dash0 --experimental apply -f dashboards/ --since <orphaned-sha> --accept-non-ancestor-ref
warning: --since '<orphaned-sha>' is not an ancestor of HEAD (likely a force-push or history rewrite); deletion detection may be inaccurate
keep.yaml: Dashboard "Production Overview" (a1b2c3d4-...) created
Are you sure you want to delete Dashboard "Old Dashboard" (b2c3d4e5-...), removed since --since ref? [y/N]: y
Dashboard "Old Dashboard" (b2c3d4e5-...) deleted

A Dash0GenerativeAiEvaluation document removed since <ref> deletes the eval by its origin, or by its dash0.com/id when it has no origin, with the same API call as evals delete. As for SLOs, --since warns before it deletes an eval identified by dash0.com/id alone, because the live eval may sit at a different, server-assigned ID.

A Dash0Skill document removed since <ref> deletes the skill by its origin, or by its dash0.com/id when it has no origin, with the same API call as agent0 skills delete.

A Dash0Dataset document removed since <ref> deletes the dataset, like any other kind, with the same API call as datasets delete. --since deletes a removed dataset after every other removed asset, because the API ignores an asset delete in a dataset that is already deleted. The delete is a 30-day soft delete. The dataset's evaluators pause at once. Applying the same slug again within 30 days restores the dataset, and the restore also brings back assets made in the UI. After 30 days, Dash0 removes the dataset and its dashboards, check rules, synthetic checks, and views. Telemetry is removed as its retention expires, not by the delete.

In agent mode (--agent-mode or DASH0_AGENT_MODE=1), a --since run that would delete a dataset requires an explicit --force, as datasets delete does. Without it, the run refuses with an error before it applies anything. A dataset that is already gone counts as deleted, and a removed dataset document with no slug fails the "no identifier" check below, like any other kind.

A Dash0AwsMetricScrapeConfig document removed since <ref> clears the integration's scrape config, with the same API call as aws-metric-scrape-configs delete. Dash0 stops scraping CloudWatch metrics for that integration, and the integration itself is kept.

A Dash0SignalToMetrics document removed since <ref> deletes the rule by its origin, or by its dash0.com/id when it has no origin, with the same API call as signal-to-metrics-rules delete. Deleting by dash0.com/id alone prints a warning: if the document was first applied to an organization without that ID, the live rule has a different, server-assigned ID, and the delete can miss it.

A document removed from git history that carried no identifier at <ref> fails the entire --since run before creating, updating, or deleting anything, since there is no reliable way to know which live asset (if any) it corresponds to.

bash
$ dash0 --experimental apply -f dashboards/ --since HEAD~1
Error: --since 'HEAD~1' found 1 document deleted with no identifier its kind is upserted by, so deletion cannot be determined reliably:
  removed.yaml
Hint: without a stable identifier there is no way to tell which live asset each document was; delete these assets directly in Dash0, or skip --since for this invocation

For a PrometheusRule CRD, identity is CRD-level: removing one alerting rule while others remain in the same CRD is detected too, resolved by its composed check-rule name (<group name> - <alert name>) rather than by the CRD's shared identifier, since there is no per-alert id to delete by:

bash
$ dash0 --experimental apply -f rules/ --since HEAD~1 --force
alerts.yaml: PrometheusRule "service-alerts" (c3d4e5f6-...) created
Check rule "service-alerts - HighLatency" deleted

Removing the whole CRD (the file or document disappears entirely, rather than one alert within it) deletes every alerting rule the CRD had, plus its recording rule if it had one — for a multi-alert CRD, that means one delete call per alert's own derived id, not one call against the CRD's literal dash0.com/id label, since that label alone was never each alert's real check-rule id to begin with:

The --dry-run preview and diff --since list one deletion per alert, at its derived id, plus a Delete Recording rule line when the CRD had recording rules:

bash
$ dash0 --experimental apply -f rules/ --since HEAD~1 --dry-run
Dry run: 0 documents from 0 files validated; 2 deletions pending due to --since 'HEAD~1'
  alerts.yaml
    * Delete Check rule "service-alerts - HighErrorRate" (app-rules--service-alerts-higherrorrate)
    * Delete Check rule "service-alerts - HighLatency" (app-rules--service-alerts-highlatency)

The run itself prints one line for the whole CRD:

bash
$ dash0 --experimental apply -f rules/ --since HEAD~1 --force
PrometheusRule "service-alerts" (app-rules) deleted

Recording rules get the symmetric treatment, but at CRD granularity rather than per-record: Dash0 models a CRD's recording rules as a single server-side resource, not one per record: entry, so there is no per-record id to delete by the way there is a per-alert composed name. Removing the last record: entry from a CRD that keeps at least one alert: entry (so the CRD's own identifier survives) is detected as a deletion of that recording rule, even though the surviving alerting rule is only ever a plain update:

bash
$ dash0 --experimental apply -f rules/ --since HEAD~1 --force
rules.yaml: PrometheusRule "app-rules" (c3d4e5f6-...) updated
Recording rule "app-rules" (c3d4e5f6-...) deleted

When every asset definition under -f's target has been deleted, --since still detects and reports every one of them, rather than failing outright. This holds whether the target directory survives (now empty of .yaml/.yml files) or was removed entirely along with its files (e.g. rm -rf dashboards/) — both count as "nothing currently there," so every asset found at <ref> becomes a deletion candidate:

bash
$ dash0 --experimental apply -f dashboards/ --since HEAD~1 --dry-run
Dry run: 0 documents from 0 files validated; 2 deletions pending due to --since 'HEAD~1'
  dashboard-a.yaml
    * Delete Dashboard "Dashboard A" (dash-a)
  view-b.yaml
    * Delete View "View B" (view-b)

Without --since, an empty or missing -f target is a plain usage error instead — apply on its own has nothing to fall back to when there is nothing to apply, so it fails fast rather than silently doing nothing. --since changes this because "everything under this target was deleted" is itself the meaningful, actionable outcome it exists to detect.

--since needs a real git binary on PATH. It is unavailable from the ghcr.io/dash0hq/cli Docker image, which is built FROM scratch and has no shell or other tools installed.

Using --since from a GitHub Actions workflow

Quote the interpolated ref and gate the whole step on the event actually providing a usable value, so an unquoted expansion or an undefined before never reaches dash0 as an ambiguous or wrong ref:

yaml
- name: Sync deletions since the last push
  if: github.event.before != '0000000000000000000000000000000000000000'
  run: dash0 --experimental apply -f dashboards/ --since "${{ github.event.before }}" --force

fetch-depth: 0 (or a depth covering github.event.before) is required on the preceding actions/checkout step — a shallow clone makes <ref> unresolvable, which --since treats as a plain error, not a fallback.

diff (experimental)

Preview what apply would do to a file, directory, or stdin, without creating, updating, or deleting anything. Requires --experimental/-X.

bash
dash0 --experimental diff -f <file|directory> [--since <ref>]
FlagShortDescription
--file-fPath to a YAML/JSON file, a directory, or - for stdin
--sinceAlso preview deletions: assets removed from -f's contents since this git ref

Unlike apply --dry-run, diff fetches each document's current state from Dash0 first (when the document carries an identifier), so it can tell a create from an update accurately — --dry-run is local-only and cannot make that distinction. For an update, diff prints a unified diff between the fetched state and the local definition, identical in format to dashboards update's own diff output. A document with no identifier, or one whose identifier does not match any existing asset, is reported as a create. An asset that exists but is soft-deleted is also reported as a create, since apply restores it.

A document in a dataset that a Dash0Dataset document in the same run creates is reported as a create too, because apply applies datasets first. The API denies the read of such a document, so diff shows it as a create without its stored state, and prints a warning for it on stderr. With a token that can only see some datasets, diff cannot tell a dataset that does not exist from one the token cannot see, so it can report both the dataset and its assets as creates.

The comparison is semantic, not a raw text diff. Key order, duration formatting (2m and 2m0s are the same value), int-vs-float differences between YAML and JSON, and API-populated defaults absent from the local document never count as a change. Slice order is ignored only for fields that are sets, such as spec.permissions, notification channels, and synthetic check locations; reordering any other list, such as spec.filter, is a change. For check rules, the default annotation values the Prometheus YAML conversion omits (dash0-threshold-critical/dash0-threshold-degraded: "0", dash0-enabled: "true") are treated as absent. For datasets, a spec field left out of the file keeps its stored value, so it does not show as removed. For teams, stored member ids are compared as email addresses, so a file that lists emails matches. Fields the API adds on write, such as the dash0.com/source label, the dash0.com/enabled: "true" annotation, and a check rule's default enabled and interval, do not count as a change when the local document leaves them out. A real change next to an ignored reorder may still show that reorder in the printed diff, but the comparison never reports a false "no differences".

A notification channel's spec.frequency and a time series aggregation's spec.priority go back to their defaults, 10m0s and 2, when the local document leaves them out. diff therefore shows a stored value that differs from the default as a change to the default, and a stored default as no change. A grant in an Agent0 skill's spec.permissions that leaves out defaultEnabled keeps its stored value, so that is not a change either.

All documents are fetched before anything is printed. If any single fetch fails for a reason other than the asset simply not existing yet — an auth failure, a 5xx, a network error — the entire preview is aborted and nothing is printed, so a partial, misleading report is never shown.

--since <ref> previews deletions the same way apply --since computes them (see apply --since for the full identity/ref-resolution semantics) — by identifier, using local git history — but never deletes anything, regardless of confirmation. A non-ancestor --since ref prints the same warning apply does, then still computes and shows the plan: diff never mutates, so there is nothing to confirm before proceeding. A deletion candidate with no dash0.com/id or dash0.com/origin label still fails the whole command before any plan is reported, matching apply --since's posture. A check rule that -f's current contents still declare is not listed as a deletion, because apply --since skips it. When every asset definition under -f's target was deleted, whether the directory is now empty or was removed, diff --since lists every deletion, the same as apply --since.

Exit code is a deliberate three-way exception to this CLI's uniform 0/1 convention, modeled on kubectl diff:

Exit codeMeaning
0No differences — the live state already matches -f's contents
1Differences are pending (creates, updates, or deletions)
2A genuine error (bad --since ref, unreachable API, and so on)

A naive CI step that only checks for a non-zero exit code fails on the routine "changes pending" case — branch explicitly on the exit code, or treat 1 as a signal rather than a failure.

Preview a directory with a pending create and update:

bash
$ dash0 --experimental diff -f dashboards/
existing.yaml
--- Dashboard (before)
+++ Dashboard (after)
@@ -2,7 +2,7 @@
 spec:
   display:
-    name: Old Name
+    name: New Name
new.yaml
  Create Dashboard "New Dashboard"
$ echo $?
1

Each file header is the path relative to -f's target, as in apply, and files are listed in sorted order.

Preview with no pending differences. Each unchanged asset gets a no changes line, then the summary line:

bash
$ dash0 --experimental diff -f dashboard.yaml
Dashboard "Production Overview": no changes
No differences
$ echo $?
0

Preview deletions alongside creates and updates:

bash
$ dash0 --experimental diff -f dashboards/ --since HEAD~1
keep.yaml
  Create Dashboard "Production Overview"
removed.yaml
  Delete Dashboard "Old Dashboard" (b2c3d4e5-...)
$ echo $?
1

A genuine error aborts before any plan is printed:

bash
$ dash0 --experimental diff -f dashboards/ --since totally-bogus-ref
Error: --since 'totally-bogus-ref' could not be resolved
Hint: check the ref for a typo; if this is a shallow clone (actions/checkout defaults to fetch-depth: 1), re-run the checkout with fetch-depth: 0 so the ref's history is available
$ echo $?
2

In agent mode, diff reports the same information as JSON: an array of {path, changes: [{op, kind, name, originOrId, since}]}, op being "create", "update", or "delete" — the same shape apply --dry-run --agent-mode uses, except diff distinguishes "create" from "update" since that is the entire point of a pre-flight preview. since is set only on "delete" changes and names the --since ref the deletion was derived from. An unchanged asset is left out of the JSON output, while the human-readable output lists it with a no changes line. A file whose assets are all unchanged is left out too, so a run with no differences prints [].

diff needs a real git binary on PATH for --since, same as apply --since. It is unavailable from the ghcr.io/dash0hq/cli Docker image, which is built FROM scratch and has no shell or other tools installed.

Asset YAML formats

Dashboard:

yaml
apiVersion: dash0.com/v1alpha1
kind: Dashboard
metadata:
  name: a1b2c3d4-5678-90ab-cdef-1234567890ab
  dash0Extensions:
    id: a1b2c3d4-5678-90ab-cdef-1234567890ab
spec:
  display:
    name: Production Overview

Pinning apiVersion on every user-authored file is a defense against silent migrations: today the server infers the default version when the field is omitted, but the same document with an explicit apiVersion will keep the same shape when a future default changes.

The user-defined identifier lives in metadata.dash0Extensions.id (see asset identifiers). metadata.name is the CRD-style metadata name and is independent of spec.display.name, which is the title shown in the UI. Omitting dash0Extensions.id causes every create / apply to allocate a new server-assigned ID, breaking idempotency.

PersesDashboard (Perses CRD, converted to a Dashboard on import):

yaml
apiVersion: perses.dev/v1alpha1
kind: PersesDashboard
metadata:
  name: my-perses-dashboard
  labels:
    dash0.com/id: a1b2c3d4-5678-90ab-cdef-1234567890ab
spec:
  display:
    name: My Perses Dashboard
  duration: 5m
  panels: {}

For PersesDashboards the user-defined identifier is the dash0.com/id metadata label (see asset identifiers).

Check rule:

yaml
apiVersion: dash0.com/v1alpha1
kind: CheckRule
id: b2c3d4e5-6789-01bc-def0-234567890abc
name: High Error Rate
expression: sum(rate(http_requests_total{status=~"5.."}[5m])) > 0.1

View:

yaml
apiVersion: dash0.com/v1alpha1
kind: View
metadata:
  name: Error Logs
  labels:
    dash0.com/id: c3d4e5f6-7890-12cd-ef01-34567890abcd
spec:
  query: "severity >= ERROR"

Synthetic check:

yaml
apiVersion: dash0.com/v1alpha1
kind: SyntheticCheck
metadata:
  name: API Health Check
  labels:
    dash0.com/id: d4e5f6a7-8901-23de-f012-4567890abcde
spec:
  url: https://api.example.com/health
  interval: 60s

SLO (Dash0's OpenSLO v1 dialect — see the "SLO documents and OpenSLO v1 compatibility" section below for how it differs from upstream OpenSLO v1). The upsert key is dash0.com/origin, not dash0.com/id — SLO IDs are server-assigned, so dash0.com/origin is the label to pin in version control:

yaml
apiVersion: openslo.com/v1
kind: SLO
metadata:
  name: checkout-api-availability
  labels:
    dash0.com/origin: checkout-api-availability
  annotations:
    dash0.com/display-name: Checkout API availability
spec:
  description: 99 percent of synthetic checks against the checkout API succeed over a rolling 28-day window.
  service: checkout-api
  budgetingMethod: Occurrences
  timeWindow:
    - duration: 28d
      isRolling: true
  indicator:
    metadata:
      name: checkout-api-synthetic-success-ratio
    spec:
      # dash0.synthetic_check.runs counts every synthetic check execution, so the
      # good-over-total ratio over its dash0.synthetic_check.outcome dimension is a
      # ready-made availability SLI. It is a counter (a Sum), hence counter: true.
      #
      # Each query is a bare PromQL vector selector: label matchers only, no
      # functions and no aggregations, or the API rejects it with a 400. Dash0
      # applies the counter and windowing math itself, so there is no rate() or
      # sum() here. The good query is a strict subset of the total query.
      ratioMetric:
        counter: true
        good:
          metricSource:
            type: Prometheus
            spec:
              query: '{otel_metric_name="dash0.synthetic_check.runs",dash0_check_type="synthetic.http",dash0_check_name="checkout-api-uptime",dash0_synthetic_check_outcome="Healthy"}'
        total:
          metricSource:
            type: Prometheus
            spec:
              query: '{otel_metric_name="dash0.synthetic_check.runs",dash0_check_type="synthetic.http",dash0_check_name="checkout-api-uptime"}'
  objectives:
    - displayName: 99% availability
      target: 0.99

Recording rule (PrometheusRule CRD format):

yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: My Recording Rules
  labels:
    dash0.com/id: e5f6a7b8-9012-34ef-0123-567890abcdef
spec:
  groups:
    - name: cpu-averages
      interval: 1m
      rules:
        - record: instance:cpu_usage:avg5m
          expr: avg without(cpu) (rate(node_cpu_seconds_total{mode!="idle"}[5m]))

Spam filter (v1alpha1 — spec.contexts is an array of signal types):

yaml
apiVersion: v1alpha1
kind: Dash0SpamFilter
metadata:
  name: Drop noisy health checks
  labels:
    dash0.com/id: a6b7c8d9-0123-45a6-7890-cdef01234567
spec:
  contexts:
    - log
    - span
  filter:
    - key: http.target
      operator: ends_with
      value: /healthz

Spam filter (v1alpha2 — spec.context is a single signal type):

yaml
apiVersion: v1alpha2
kind: Dash0SpamFilter
metadata:
  name: Drop debug logs
  labels:
    dash0.com/id: b7c8d9e0-1234-56b7-8901-def012345678
spec:
  context: log
  filter:
    - key: otel.log.severity.range
      operator: is
      value: DEBUG

The CLI detects the apiVersion from the document and routes to the corresponding endpoint. The list endpoint returns v1alpha1 definitions only; use spam-filters get <id> to retrieve a filter in its native apiVersion. The delete endpoint is version-agnostic.

Notification channel (organization-level, no --dataset):

yaml
apiVersion: dash0.com/v1alpha1
kind: Dash0NotificationChannel
metadata:
  name: Slack Alerts
  labels:
    dash0.com/origin: my-slack-channel
spec:
  type: slack
  config:
    url: https://hooks.slack.com/services/T00/B00/XXX
  # Optional routing conditions. Each top-level list item is an OR group; conditions within a
  # group are combined with AND.
  routing:
    filters:
      - - key: deployment.environment.name
          operator: is
          value: production
    # spec.routing.assets is API-managed and must not be set here: the API derives it from the
    # check rules and synthetic checks bound to this channel, and ignores it on write. Bind a
    # check rule via its dash0.com/notification-channel-ids annotation, or a synthetic check via
    # its spec.notifications.channels.

Dataset (organization-level, no --dataset, requires --experimental):

yaml
apiVersion: dash0.com/v1alpha1
kind: Dash0Dataset
metadata:
  name: Staging
  labels:
    dash0.com/id: staging
spec:
  retention:
    traces: 30d
    logs: 60d
  privacy:
    ipAddresses:
      endUser:
        storage: anonymize
    geoLocation:
      endUser:
        storage: up_to_country
  processing:
    spanEventsToLogs: false
  permissions:
    - role: basic_member
      actions:
        - dataset:read

apiVersion is required, and dash0.com/v1alpha1 is the only supported value. The dataset slug is spec.slug or, when that is absent, metadata.labels["dash0.com/id"]; spec.slug wins when a document carries both. It is required and cannot change after creation. metadata.name is the display name. Every spec field is optional: a field left out on create takes the server default, and a field left out on update keeps its stored value. spec.retention sets how long each signal is kept (traces, logs, metrics, profiles, webEvents). A retention class is the total number of days: 30d, 60d, 90d, 120d, 210d, or 390d. spec.privacy sets IP address storage, geolocation storage, and redaction. spec.processing sets span-event conversion, semantic convention upgrades, and darkplane opt-ins. A dataset document has no telemetry filters; spam filters own them.

Agent0 skill (organization-level, no --dataset, requires --experimental for the agent0 skills commands):

yaml
kind: Dash0Skill
metadata:
  labels:
    dash0.com/origin: dash0-cli_incident-triage
spec:
  files:
    - relativePath: SKILL.md
      content: |
        ---
        name: incident-triage
        description: Triage a production incident from its failed checks.
        ---

        Start from the failed check, then follow the trace to the failing service.
    - relativePath: references/runbook.md
      content: |
        # Runbook

        Check the deploy log first.
  permissions:
    - role: basic_member
      actions:
        - custom_skill:read
      defaultEnabled: false

The skill's name is the name in the SKILL.md frontmatter, and is unique per organization. metadata.labels["dash0.com/origin"] is the upsert key; an origin is set on create and cannot change. The server rejects a custom_skill:write grant on a skill whose origin marks it as managed by Terraform, the Dash0 operator, or the Dash0 platform; dash0-cli_ origins accept it. dash0.com/enabled is per user, so it is never sent; set defaultEnabled: false on a grant to ship the skill turned off for the users that grant matches. Only admins may set defaultEnabled on any grant; members only on their own user grant or on a grant to a team they belong to.

Eval (generative AI evaluation; dataset-scoped, requires --experimental for the evals commands):

yaml
kind: Dash0GenerativeAiEvaluation
metadata:
  name: answer-relevance
  labels:
    dash0.com/origin: dash0-cli_answer-relevance
  annotations:
    dash0.com/folder-path: /checkout
spec:
  display:
    name: Answer relevance
    description: Judges whether the answer addresses the question.
  enabled: true
  judge:
    model: standard
    output:
      kind: boolean
    systemPrompt: You judge whether an answer is relevant to the question.
    userPrompt: "Question: {{ gen_ai.input.messages }}\nAnswer: {{ gen_ai.output.messages }}"
  match:
    filters:
      - key: gen_ai.operation.name
        operator: is_set
  sample:
    rate: 0.25

See Eval documents for the fields that cannot change after create.

Team (organization-level, no --dataset, requires --experimental):

yaml
apiVersion: dash0.com/v1alpha1
kind: Dash0Team
metadata:
  name: backend-team
  labels:
    dash0.com/origin: backend-team
spec:
  display:
    name: Backend Team
    color:
      from: "#FF6B6B"
      to: "#4ECDC4"
  members:
    - alice@example.com
    - bob@example.com

spec.members entries can be email addresses (recommended for GitOps) or internal member ids; the server resolves emails during reconciliation.

Time series aggregation (dataset-scoped, requires the organization admin role):

yaml
apiVersion: dash0.com/v1alpha1
kind: Dash0TimeSeriesAggregation
metadata:
  name: http-server-request-duration
  labels:
    dash0.com/origin: http-server-request-duration
spec:
  enabled: true
  display:
    name: HTTP server request duration
  match:
    metricNameMatcher:
      operator: is
      value: http.server.request.duration
  sample:
    interval: 5m

dash0.com/origin is mandatory and is the only upsert key. The three names are independent: setting metadata.name, spec.display.name, or the origin does not change either of the others.

Optional spec fields: priority (the lower the value, the earlier Dash0 evaluates the aggregation), sample.delay, sample.staleAfter, match.otherFilters, and attributeModifications.

Signal-to-metrics rule (dataset-scoped):

yaml
kind: Dash0SignalToMetrics
metadata:
  name: checkout-errors
  labels:
    dash0.com/origin: dash0-cli_checkout-errors
spec:
  display:
    name: Checkout error logs
  enabled: true
  match:
    signal: logs
    filters:
      - key: service.name
        operator: is
        value: checkout
      - key: otel.log.severity.range
        operator: is
        value: ERROR
  output:
    name: checkout.error_logs
    description: Error log records emitted by the checkout service
    interval: 1m
    keepResourceAttributes:
      - operator: is
        value: service.name

spec.match.signal is logs or spans, and spec.match.filters uses the same criteria as --filter (see filter syntax). Without spec.output.type, the rule counts matching log records, or records span durations as an exponential histogram. Set spec.output.type to sum, gauge, or exponential-histogram together with spec.output.value, an OTTL expression that computes the number to record. spec.output.keepResourceAttributes and spec.output.keepSignalAttributes select the attributes that the metric keeps. spec.targetDatasetMode writes the metric to the rule's own dataset (original, the default), to spec.alternativeDatasetId (alternative), or to both (both).

AWS metric scrape config (organization-level, no --dataset, requires --experimental for the aws-metric-scrape-configs commands):

yaml
apiVersion: dash0.com/v1alpha1
kind: Dash0AwsMetricScrapeConfig
metadata:
  labels:
    dash0.com/id: 27755ed0-0009-422d-8c11-19c6dd72df98
spec:
  namespaces:
    - namespace: AWS/Lambda
      metrics:
        - Errors
        - Invocations
    - namespace: AWS/SQS
      metrics:
        - ApproximateAgeOfOldestMessage
        - NumberOfMessagesSent

dash0.com/id is the id of the AWS integration and is required. spec.namespaces is the complete list of CloudWatch namespaces to scrape: a namespace that is not listed is not scraped, and namespaces: [] stops all scraping. Each namespace takes an optional filter, and spec takes an optional integrationFilter; both are lists of filter criteria (key, operator, value). metadata.name is the integration's name: get exports it, and the API ignores it on write. The API returns namespaces and metrics sorted, and the diff ignores their order.

Mixed PrometheusRule (one alerting rule and one recording rule in the same CRD):

yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: Mixed Rules
  labels:
    dash0.com/id: c8d9e0f1-2345-67c8-9012-ef0123456789
spec:
  groups:
    - name: errors-and-cpu
      interval: 1m
      rules:
        - alert: HighErrorRate
          expr: sum(rate(errors[5m])) > 0.1
          for: 5m
          labels:
            severity: critical
        - record: instance:cpu_usage:avg5m
          expr: avg without(cpu) (rate(node_cpu_seconds_total{mode!="idle"}[5m]))

The alerting rule is created as a check rule under /api/alerting/check-rules, and a recording-rule CRD with only the recording rule is created under /api/recording-rules.

Multi-document file (separated by ---):

yaml
apiVersion: dash0.com/v1alpha1
kind: Dashboard
metadata:
  name: e1f2a3b4-5678-90e5-6789-abcdef012345
spec:
  display:
    name: First Dashboard
---
apiVersion: dash0.com/v1alpha1
kind: CheckRule
id: f2a3b4c5-6789-01f6-7890-bcdef0123456
name: Second Document Rule
expression: up == 0

SLO documents and OpenSLO v1 compatibility

Dash0 SLO documents follow the OpenSLO v1 document shape, but they are not interchangeable with upstream OpenSLO v1: the apiVersion differs, and only a subset of the specification is supported. Read this before authoring or generating a document, because everything listed below as unsupported is rejected with a 400 (with a single exception, spec.alertPolicies).

apiVersion is openslo.com/v1, not upstream's bare openslo/v1. The API accepts both spellings on write and canonicalizes to openslo.com/v1 on read, so slos list -o yaml and slos get -o yaml always emit the domain-qualified form. The domain-qualified form is a deliberate Dash0 drift from upstream: a Kubernetes CustomResourceDefinition API group must contain a dot, so the same document can also be installed as a custom resource.

Only a subset of the specification is supported. A document must declare exactly one objective, an inline ratioMetric indicator, Occurrences budgeting, and a single rolling 4w/28d time window. When timeWindow is omitted a rolling 28d window is used, and the evaluation window is currently fixed at 28d regardless of the value provided. That default is not materialized on read: an SLO created without timeWindow returns timeWindow: null rather than an explicit 28d window, so a stored document cannot be used to tell "defaulted to 28d" apart from "unset".

These fields are rejected with a 400:

RejectedUse instead
spec.indicator.spec.thresholdMetrican inline ratioMetric
spec.indicatorRefan inline spec.indicator
metricSource.metricSourceRefan inline metricSource.spec.query
more than one objective, or composite objectives (compositeWeight, per-objective indicator/indicatorRef)one objective that uses the SLO's top-level indicator
threshold objective fields (op, value)target or targetPercent
time-slice objective fields (timeSliceTarget, timeSliceWindow)Occurrences budgeting
Timeslices and RatioTimeslices budgetingbudgetingMethod: Occurrences
calendar-aligned windows (timeWindow[].calendar, isRolling: false, or a duration other than 4w/28d)duration: 28d with isRolling: true

spec.alertPolicies is the one exception. It is accepted for OpenSLO compatibility but silently ignored: alert policies are not stored, not evaluated, and not returned on read. Do not rely on it, and use check rules for alerting instead.

Queries must be bare PromQL vector selectors. Only metricSource.type: Prometheus is supported; other types are rejected with a 400. metricSource.spec.query must be a plain vector selector with label matchers only — no function calls and no aggregations, so no rate() and no sum() — because Dash0 applies the counter and windowing math itself, driven by ratioMetric.counter.

spec.service packs the service namespace and name into one string. The API splits on the first /, so payments/eu links the SLO to the service named eu in the namespace payments, and a value with no slash is just a service name. If a service name itself contains a /, prefix the value with a leading / to treat the remainder as a literal name with no namespace: /payments/eu resolves to the name payments/eu. A value matching no service is not an error — the SLO is simply not linked to a service.

Dash0 extensions live in metadata. metadata.labels and metadata.annotations carry Dash0-specific keys under the dash0.com/ prefix that upstream OpenSLO does not define, including dash0.com/origin, dash0.com/id, dash0.com/dataset, dash0.com/display-name, dash0.com/enabled, and dash0.com/folder-path. SLO evaluation also applies a fixed 5-minute settling delay: at any moment the SLI reflects telemetry that arrived at least 5 minutes ago, so late-arriving signals are counted, at the cost of a small, fixed lag between live behavior and SLO state.

The same document body is what the Dash0 operator's SLO custom resource accepts. The operator defines an openslo.com/v1 SLO CRD (group openslo.com, kind SLO, version v1) whose spec is the same supported subset — description, service, budgetingMethod, timeWindow, an inline indicator with a ratioMetric over good/total Prometheus sources, and objectives — and it deliberately omits alertPolicies and indicatorRef. So one document body can be applied through the CLI, the Terraform provider, or kubectl apply. That CRD is not released yet (dash0hq/dash0-operator#1247), so treat the kubectl apply path as forthcoming rather than available today.

Eval documents (experimental)

An eval (generative AI evaluation) uses a judge model to score a sample of the generative AI spans in a dataset. dash0 --experimental evals manages evals with the five standard subcommands, and apply accepts kind: Dash0GenerativeAiEvaluation (see the YAML example). The command is also available under the alias generative-ai-evaluations.

List the evals of the dataset:

bash
dash0 --experimental evals list -o wide

Export an eval to a file:

bash
dash0 --experimental evals get dash0-cli_answer-relevance -o yaml > eval.yaml

Create an eval from a file:

bash
dash0 --experimental evals create -f eval.yaml

Preview an update without applying it:

bash
dash0 --experimental evals update -f eval.yaml --dry-run

Delete an eval without a confirmation prompt:

bash
dash0 --experimental evals delete dash0-cli_answer-relevance --force

get, update, and delete take an ID or a dash0.com/origin. update addresses the eval by the argument, else the file's origin, else its ID, and fails with "not found" for an eval that does not exist, instead of creating one. list -o wide and -o csv add the DATASET and ORIGIN columns; there is no URL column.

Important

Eval origins are unique per organization, while each eval belongs to exactly one dataset. You therefore cannot apply one document to two datasets. The second apply fails with 404 ... does not exist or is inaccessible to you, and the CLI adds a hint naming the organization-wide origin namespace. Use a distinct origin per dataset, for example answer-relevance-staging.

metadata.name and spec.judge.output.kind cannot change after create. metadata.name identifies the eval and its results within the dataset and must be unique there; rename the eval in Dash0 with spec.display.name instead. Results are stored per output kind (boolean, numeric, or categorical), so a different output kind needs a new eval with a new metadata.name and origin. A write that changes either field fails with an error that names the field and the fix.

The CLI never sends dash0.com/version. Without it the server overwrites the stored eval unconditionally, so a document exported earlier still applies after somebody changed the eval in the UI. The CLI also removes dash0.com/id, dash0.com/source, dash0.com/dataset, and the created, updated, and deleted timestamps before it writes; it keeps dash0.com/origin, dash0.com/folder-path, dash0.com/sharing, and the whole spec.

spec.match.filters must contain a gen_ai.operation.name filter with operator is_set and no value. The server rejects a create or update without it. evals create, evals update, and apply check this filter before any API call, also with --dry-run. They also check that metadata.name, spec.judge.model, spec.judge.output.kind, and spec.judge.userPrompt are set, and that spec.sample.rate is between 0 and 1. spec.enabled and spec.sample.rate must be present, because a document without them would create an eval that never samples a trace. If one document of an apply fails this check, apply writes no document.

Version history and eval templates are not available from the CLI.

Signal-to-metrics rules

Signal-to-metrics rules are part of Signal Control. Each rule matches logs or spans with a filter and turns the matching signals into a metric, so you can keep the metric and drop the raw signals. signal-to-metrics-rules (alias s2m) has the five standard subcommands plus test, and apply accepts the Dash0SignalToMetrics kind. Rules are dataset-scoped, and get, update, and delete accept either the rule's dash0.com/origin label or its ID. An origin is unique across the organization, so get finds a rule whatever --dataset says, and its Dataset: line shows the dataset it belongs to. update (also with --dry-run) and delete with another dataset fail with a hint that names the cause.

Filtering list

list passes these filters to the API, which applies them before the limit:

FlagDescription
--signalOnly list rules for logs or spans
--enabledOnly list enabled rules (--enabled) or disabled rules (--enabled=false); omit to list both
--nameOnly list rules whose display name or metric name contains this text, or whose ID equals it
--origin-prefixOnly list rules whose origin starts with this prefix

Write the value of --enabled with =, as in --enabled=false. --enabled false fails with an error, because a boolean flag does not take the next argument as its value.

The table format shows NAME, ID, SIGNAL, METRIC, and ENABLED. The wide and csv formats add DATASET and ORIGIN.

List the disabled rules for spans:

bash
$ dash0 s2m list --signal spans --enabled=false
NAME                                      ID                                            SIGNAL  METRIC                                    ENABLED
Frontend request duration                 signal_to_metrics_01kq3mb7w5x3y1z9a7b5c3d1e9  spans   frontend.request.duration                 false

signal-to-metrics-rules test

test sends a rule definition to Dash0, which validates it and counts the logs or spans its match filter selects over a time window. Nothing is created or changed, so use it to check a new rule before create or apply. A definition that fails validation returns an error with every problem the API found.

bash
dash0 s2m test -f <file> [--from <time>] [--to <time>] [-o table|json]

--from defaults to now-15m and --to to now. Both accept relative expressions like now-1h or absolute ISO 8601 timestamps. -o json prints the API response, which is the default in agent mode.

Count the signals a rule matches over the last hour:

bash
$ dash0 s2m test -f checkout-errors.yaml --from now-1h
Signal-to-metrics rule "Checkout error logs" matched 1284 logs
From: 2026-10-21T07:15:00Z
To: 2026-10-21T08:15:00Z

Test the definition of an existing rule (the get | test pipeline is a single command):

bash
dash0 s2m get <origin-or-id> -o yaml | dash0 s2m test -f -

Query commands

Query commands search and retrieve telemetry signals and alerting issues from Dash0. They share a common set of characteristics:

  • Time range flags: --from and --to (relative expressions like now-1h or absolute ISO 8601 timestamps).
  • Filter flag: --filter with the standard key [operator] value syntax (see filter syntax).
  • Column flag: --column for customizing table/CSV output (see custom columns).
  • Pagination: --limit.
  • Output formats: table, json, csv (no wide or yaml).
  • Sampling flag: --precision to disable adaptive sampling on logs query and spans query (traces get always disables it; metrics instant and failed-checks query do not honor it).
  • A deep link that reopens the same query in the Dash0 web app: on stderr in table and csv output, and as a dash0ExplorerUrl field in json output (see explorer deep links).

logs query

Query log records from Dash0. Requires api-url and auth-token.

bash
dash0 logs query [flags]
FlagDefaultDescription
--fromnow-15mStart of time range
--tonowEnd of time range
--limit50Maximum number of records
--filterFilter expression (repeatable); accepts text (key [operator] value) or JSON from the Dash0 UI
-otableOutput format: table, json (OTLP/JSON), or csv
--skip-headerfalseOmit the header row from table and csv output
--columnColumn to display (repeatable; table and csv only); see custom columns
--precisionSampling mode for the query: adaptive (server default) or disabled (return every match). See Precision Mode

Both --from and --to accept relative expressions like now-1h or absolute ISO 8601 timestamps. Absolute timestamps are normalized to millisecond precision, so 2024-01-25T10:00:00Z and 2024-01-25 are both accepted.

A link that reopens the same query in the Dash0 logs explorer is emitted alongside the results — see explorer deep links.

Query recent logs (last 15 minutes, up to 50 records):

bash
$ dash0 logs query
TIMESTAMP                     SEVERITY    BODY
2026-02-16T09:12:03.456Z      INFO        Application started successfully
2026-02-16T09:12:04.789Z      ERROR       Connection timeout
...

Query with a time range:

bash
dash0 logs query --from now-1h --to now --limit 100

Filter by service:

bash
dash0 logs query --filter "service.name is my-service"

Filter by severity (errors and above):

bash
dash0 logs query --filter "otel.log.severity.number gte 17"

Multiple filters (AND logic):

bash
dash0 logs query \
    --filter "service.name is my-service" \
    --filter "otel.log.severity.range is_one_of ERROR WARN"

Use JSON filter criteria copied from the Dash0 UI:

bash
dash0 logs query \
    --filter '[{"key":"service.name","operator":"is","value":"api"}]'

Output as JSON (full OTLP payload):

bash
dash0 logs query -o json

Output as CSV (pipe-friendly):

bash
$ dash0 logs query -o csv
otel.log.time,otel.log.severity.range,otel.log.body
2026-02-16T09:12:03.456Z,INFO,Application started successfully
...

CSV without header:

bash
dash0 logs query -o csv --skip-header

Disable adaptive sampling so a narrow filter always returns every match:

bash
$ dash0 logs query --precision disabled --filter "test.id is <id>"

spans query

Query spans from Dash0. Requires api-url and auth-token.

bash
dash0 spans query [flags]
FlagDefaultDescription
--fromnow-15mStart of time range
--tonowEnd of time range
--limit50Maximum number of spans
--filterFilter expression (repeatable); accepts text (key [operator] value) or JSON from the Dash0 UI
-otableOutput format: table, json (OTLP/JSON), or csv
--skip-headerfalseOmit the header row from table and csv output
--columnColumn to display (repeatable; table and csv only); see custom columns
--precisionSampling mode for the request: adaptive (server default) or disabled (return every matching span). See Precision Mode

Both --from and --to accept relative expressions like now-1h or absolute ISO 8601 timestamps.

A link that reopens the same query in the Dash0 traces explorer is emitted alongside the results — see explorer deep links.

Query recent spans (last 15 minutes, up to 50 spans):

bash
$ dash0 spans query
TIMESTAMP                     DURATION    SPAN NAME                                 STATUS    SERVICE NAME                    PARENT ID         TRACE ID                          SPAN LINKS
2026-02-16T09:12:03.456Z      150ms       GET /api/users                            OK        my-service                                        0af76519...
2026-02-16T09:12:04.789Z      500ms       POST /api/orders                          ERROR     api-gateway                     b7ad6b7169203331  3d3d3d3d...
...

Query with a time range:

bash
dash0 spans query --from now-1h --to now --limit 100

Filter by service:

bash
dash0 spans query --filter "service.name is my-service"

Filter by span status:

bash
dash0 spans query --filter "otel.span.status.code is ERROR"

Use JSON filter criteria copied from the Dash0 UI:

bash
dash0 spans query \
    --filter '[{"key":"service.name","operator":"is","value":"api"}]'

Output as CSV:

bash
$ dash0 spans query -o csv
otel.span.start_time,otel.span.duration,otel.span.name,otel.span.status.code,service.name,otel.parent.id,otel.trace.id,otel.span.links
2026-02-16T09:12:03.456Z,150ms,GET /api/users,OK,my-service,,0af76519...,
...

Output as OTLP JSON:

bash
dash0 spans query -o json --limit 10

The --filter flag uses the same filter syntax as logs query. Common span attribute keys: service.name, otel.span.status.code, otel.trace.id, otel.span.name.

traces get

Retrieve all spans belonging to a trace from Dash0. Requires api-url and auth-token.

traces get always disables adaptive sampling so every span in the trace is returned. The command does not accept the --precision flag.

bash
dash0 traces get <trace-id> [flags]
FlagDefaultDescription
--fromnow-1hStart of time range
--tonowEnd of time range
-otableOutput format: table, json (OTLP/JSON), or csv
--skip-headerfalseOmit the header row from table and csv output
--follow-span-linksFollow span links to related traces; optional value sets the lookback period (default: 1h)
--columnColumn to display (repeatable; table and csv only); see custom columns

The <trace-id> argument must be 32 hex characters.

In table format, spans are displayed as a hierarchical tree with child spans indented under their parents. A link that opens the same trace in the Dash0 traces explorer is emitted alongside the results — see explorer deep links.

Get all spans in a trace:

bash
$ dash0 traces get <trace-id>
TIMESTAMP                     DURATION    TRACE ID                          SPAN ID           PARENT ID         SPAN NAME                                   STATUS    SERVICE NAME                    SPAN LINKS
2026-02-16T09:12:03.456Z      200ms       0af7651916cd43dd8448eb211c80319c  b7ad6b7169203331                    GET /api/users                              OK        frontend
2026-02-16T09:12:03.486Z      150ms       0af7651916cd43dd8448eb211c80319c  00f067aa0ba902b7  b7ad6b7169203331  SELECT * FROM users                         UNSET     frontend
2026-02-16T09:12:03.641Z      10ms        0af7651916cd43dd8448eb211c80319c  123456789abcdef0  b7ad6b7169203331  serialize response                          UNSET     frontend

Get a trace with a specific time range:

bash
dash0 traces get <trace-id> --from now-2h

Follow span links to related traces:

bash
dash0 traces get <trace-id> --follow-span-links

Follow span links with a custom lookback period:

bash
dash0 traces get <trace-id> --follow-span-links 2h

Output as OTLP JSON:

bash
dash0 traces get <trace-id> -o json

Output as CSV:

bash
$ dash0 traces get <trace-id> -o csv
otel.trace.id,otel.span.start_time,otel.span.duration,otel.span.id,otel.parent.id,otel.span.name,otel.span.status.code,service.name,otel.span.links
0af7651916cd43dd8448eb211c80319c,2026-02-16T09:12:03.456Z,200ms,b7ad6b7169203331,,GET /api/users,OK,frontend,
...

When --follow-span-links is used, linked traces are displayed after the primary trace, separated by a header line showing the linked trace ID. The command follows links recursively up to a maximum of 20 traces.

metrics instant

Run an instant PromQL query against the Dash0 API, returning a single datapoint per time series.

With a raw PromQL expression:

bash
dash0 metrics instant --promql <promql> [--from <timestamp>] [--dataset <dataset>] [-o <format>]

With one or more --filter expressions (translated to PromQL label matchers):

bash
dash0 metrics instant --filter <filter> [--from <timestamp>] [--dataset <dataset>] [-o <format>]
FlagDefaultDescription
--promqlPromQL query expression; mutually exclusive with --filter
--filterFilter as key [operator] value, translated to PromQL label matchers (repeatable); mutually exclusive with --promql
--fromnowEvaluation timestamp; supports relative expressions like now-1h or absolute ISO 8601 timestamps
--datasetDataset to query
-otableOutput format: table, json, or csv (default: json in agent mode)
--skip-headerfalseOmit the header row from table and csv output
--columnColumn to display (repeatable; table and csv only); see below

At least one of --promql or --filter must be specified.

The --query flag (alias for --promql) and --time flag (alias for --from) are deprecated but still accepted for backwards compatibility.

Output formats

The default table output uses a verbose label-per-line format showing all labels for each metric result. Use --column to switch to a columnar table format with specific columns.

The csv output defaults to columns: timestamp, __name__, value. Use --column to override the default columns.

When no --column is specified, a hint listing the available label keys is printed to stderr.

The --column flag accepts any Prometheus label key from the result (e.g., __name__, service_name, job, instance). Built-in columns timestamp and value are always available. The --column flag is not supported with -o json.

Note

The column otel_metric_name is not available in Prometheus query results. Use __name__ for the Prometheus-normalized metric name.

Filter syntax

The --filter flag uses the same filter syntax as logs query. Filters are translated to PromQL label matchers. For example, --filter "service.name is my-service" becomes {service_name="my-service"}.

OTel attribute keys are normalized to Prometheus label names (dots replaced with underscores).

Examples

Query the current request rate per service:

bash
dash0 metrics instant --promql 'sum by (service_name) (rate(http_server_request_duration_seconds_count[5m]))'

Query against a specific dataset:

bash
dash0 metrics instant --promql 'sum(rate(http_server_request_duration_seconds_count[5m]))' --dataset production

Query at a specific evaluation time:

bash
dash0 metrics instant --promql 'sum by (service_name) (rate(http_server_request_duration_seconds_count[5m]))' --from 2024-01-25T10:00:00Z

Query with filters instead of PromQL:

bash
dash0 metrics instant --filter 'service.name is my-service'

Output as CSV:

bash
dash0 metrics instant --promql 'sum by (service_name) (rate(http_server_request_duration_seconds_count[5m]))' -o csv

Output as CSV without header:

bash
dash0 metrics instant --promql 'sum by (service_name) (rate(http_server_request_duration_seconds_count[5m]))' -o csv --skip-header

Select specific columns:

bash
dash0 metrics instant --promql 'sum by (service_name) (rate(http_server_request_duration_seconds_count[5m]))' --column value --column service_name

Output as JSON:

bash
dash0 metrics instant --promql 'sum by (service_name) (rate(http_server_request_duration_seconds_count[5m]))' -o json

failed-checks query

Query failed check instances (active or recently resolved issues raised by check rules) from Dash0 alerting. Requires api-url and auth-token.

bash
dash0 failed-checks query [flags]
FlagDefaultDescription
--fromnow-15mStart of time range
--tonowEnd of time range
--limit50Maximum number of failed checks
--filterFilter expression (repeatable); accepts text (key [operator] value) or JSON from the Dash0 UI
--statusFilter by instance status: comma-separated list of critical, degraded, healthy, inactive, pending
--activefalseOnly show currently active (unresolved) issues
-otableOutput format: table, json, or csv
--skip-headerfalseOmit the header row from table and csv output
--columnColumn to display (repeatable; table and csv only); see custom columns

The --status and --active flags are convenience shortcuts that translate into the equivalent --filter expressions on the well-known issue attributes the alerting API exposes (dash0.issue.status and dash0.issue.end_time). Custom labels — for example a team-defined priority or owner label — must be filtered through --filter.

A link that reopens the same query in the Dash0 failed checks view is emitted alongside the results — see explorer deep links.

Aliases: list, ls.

List currently active (unresolved) issues:

bash
$ dash0 failed-checks query --active
CHECK RULE                                     STATUS      STARTED              SUMMARY
BLOCK DEPLOYMENTS - please update reason ...   critical    2026-06-19 13:10:54  BLOCK DEPLOYMENTS due to XYZ
...

Filter by instance status:

bash
dash0 failed-checks query --status critical,degraded

Filter by an arbitrary issue label (priority, owner, or any other label set on the originating check rule):

bash
dash0 failed-checks query --filter "priority is_one_of p1 p2" --active

Issues from the last hour (active and resolved):

bash
dash0 failed-checks query --filter "priority is p1" --from now-1h

Use JSON filter criteria copied from the Dash0 UI:

bash
dash0 failed-checks query \
    --filter '[{"key":"priority","operator":"is","value":"p1"}]'

Output as JSON:

bash
dash0 failed-checks query --active -o json

Output as CSV:

bash
$ dash0 failed-checks query --status critical --active -o csv
dash0.issue.check_rule_name,dash0.issue.status,dash0.issue.start_time,dash0.issue.summary
BLOCK DEPLOYMENTS - please update reason ...,critical,2026-06-19 13:10:54,BLOCK DEPLOYMENTS due to XYZ
...

Show only specific columns:

bash
dash0 failed-checks query \
    --column "check rule" --column status --column summary

Any issue label key (for example priority or owner) can be used directly as a column name. Add a PRIORITY column derived from the priority issue label:

bash
$ dash0 failed-checks query --active --column "check rule" --column priority --column status --column summary
CHECK RULE                                     priority  STATUS      SUMMARY
BLOCK DEPLOYMENTS - please update reason ...   p1        critical    BLOCK DEPLOYMENTS due to XYZ
...

The header for a label-based column defaults to the label key as-is. To override it, combine --column with --skip-header and render the header separately, or use the JSON output and post-process.

Column aliases (case-insensitive): check rule/rule → dash0.issue.check_rule_name, status → dash0.issue.status, started/start → dash0.issue.start_time, ended/end → dash0.issue.end_time, summary → dash0.issue.summary, description → dash0.issue.description, id → dash0.issue.id, identifier → dash0.issue.identifier, check rule id/rule id → dash0.issue.check_rule_id.

Filter syntax

The --filter flag accepts expressions in the form key [operator] value. When the operator is omitted, is (exact match) is assumed.

The flag also accepts JSON filter criteria as produced by the Dash0 UI "copy filter criteria" feature. A JSON array of filter objects is expanded into multiple filters; a single JSON object is treated as one filter. For example:

bash
# Paste a JSON array copied from the Dash0 UI
$ dash0 logs query --filter '[
  {"key": "service.name", "operator": "is", "value": "api"},
  {"key": "otel.log.severity.range", "operator": "is_one_of", "values": ["ERROR", "WARN"]}
]'

JSON filters and text filters can be mixed freely across multiple --filter flags.

OperatorAliasDescription
is=Exact match (default when operator is omitted)
is_not!=Not equal
containsValue contains substring
does_not_containValue does not contain substring
starts_withValue starts with prefix
does_not_start_withValue does not start with prefix
ends_withValue ends with suffix
does_not_end_withValue does not end with suffix
matches~Regular expression match
does_not_match!~Negated regular expression match
gt>Greater than
gte>=Greater than or equal
lt<Less than
lte<=Less than or equal
is_setAttribute is present
is_not_setAttribute is absent
is_one_ofMatches any of the given values (space-separated)
is_not_one_ofMatches none of the given values (space-separated)
is_anyMatches any value

Keys containing spaces can be single-quoted: 'my key' is value. Values containing spaces can be single-quoted: deployment.environment.name is_one_of 'us east' 'eu west' staging.

Common log attribute keys: service.name, otel.log.severity.number, otel.log.severity.range, otel.log.severity.text, otel.log.body. Valid values for otel.log.severity.range: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN.

Precision mode (adaptive sampling)

By default the Dash0 API applies adaptive sampling to log and span queries. The sampler intelligently samples telemetry data during query execution to keep queries fast on large datasets, while returning statistically representative results. All telemetry data is stored and available; adaptive sampling only affects how queries are executed, not what data is kept.

The representative-but-incomplete trade-off is fine for exploration, but for narrow lookups that expect every match — scripted lookups by trace ID, request ID, or any other near-unique attribute — a single matching log or span can be omitted from the response.

Pass --precision disabled to logs query or spans query to switch the request to Precision mode, the API equivalent of the Precision toggle in the Dash0 UI. Precision mode keeps queries deterministic at the cost of higher latency on large windows.

The flag accepts either value of the API's sampling mode:

  • --precision disabled — disable adaptive sampling and return every match.
  • --precision adaptive — explicit form of the default; useful when overriding a profile or environment-set default in scripts.

When the flag is omitted, the request leaves the sampling field unset and the server applies its default (currently adaptive).

bash
# Narrow lookup: always return every matching log
dash0 logs query --precision disabled --filter "test.id is <id>"
bash
# Narrow lookup: always return every matching span
dash0 spans query --precision disabled --filter "test.id is <id>"

traces get does not accept --precision — it always disables adaptive sampling so the complete trace, including any spans that would otherwise be sampled out, is returned.

The flag is not available on metrics instant: the Prometheus-compatible API the command uses does not honor the sampling field.

Custom columns

The --column flag lets you choose which columns appear in table and csv output. It is repeatable: pass one --column per column. When used, the flag replaces the default column set entirely.

Show only timestamp and body:

bash
dash0 logs query --column time --column body

Include an arbitrary attribute column:

bash
dash0 spans query \
    --column timestamp --column duration \
    --column "span name" --column http.request.method

Include an arbitrary attribute column by key:

bash
dash0 logs query --column time --column service.name --column body

Each command has predefined columns with short aliases. Aliases are matched case-insensitively. Any OTLP attribute key (resource, scope, or record/span level) can also be used as a column; its header defaults to the attribute key as-is.

Log query aliases:

AliasAttribute key
time, timestampotel.log.time
severityotel.log.severity.range
bodyotel.log.body

Span query aliases:

AliasAttribute key
timestamp, start time, timeotel.span.start_time
durationotel.span.duration
span name, nameotel.span.name
status, status codeotel.span.status.code
service name, serviceservice.name
parent idotel.parent.id
trace idotel.trace.id
span idotel.span.id
span links, linksotel.span.links

Trace get aliases share the span query aliases.

Failed-checks query aliases:

AliasAttribute key
check rule, ruledash0.issue.check_rule_name
statusdash0.issue.status
started, start, start timedash0.issue.start_time
ended, end, end timedash0.issue.end_time
summarydash0.issue.summary
descriptiondash0.issue.description
iddash0.issue.id
identifierdash0.issue.identifier
check rule id, rule iddash0.issue.check_rule_id

Any issue label key (e.g. priority, owner, or any custom label set on the originating check rule) can be used directly as a column name. For example, --column priority renders a column whose values come from the priority issue label.

Aliases that contain spaces must be quoted: --column "start time".

The --column flag is not supported with JSON output. Using --column with -o json returns an error.

logs query, spans query, failed-checks query, and traces get print a link that reopens the same query in the corresponding Dash0 explorer. The link carries the filters, the time range, and the dataset, so following it lands on the same result set in the web app, ready to narrow further or share with a colleague.

Where the link appears depends on the output format:

  • In table and csv output it is written to stderr, after the results, separated by a blank line. Keeping it off stdout means piping or redirecting the results never picks up a stray line — a CSV stream stays parseable.
  • In json output it is carried in the document itself, as a top-level dash0ExplorerUrl field. This is what makes the link reachable in agent mode, where JSON is the default and stdout is usually all that is consumed.

In table output:

bash
$ dash0 logs query --filter "otel.log.severity.range is ERROR"
TIMESTAMP                 SEVERITY  BODY
2026-02-16T09:12:04.789Z  ERROR     Connection timeout
...

Open this query in Dash0:
    https://app.dash0.com/goto/logs?filter=%5B%7B%22key%22%3A%22otel.log.severity.range%22...&from=now-15m&to=now

traces get prints Open this trace in Dash0: instead, with a link carrying the trace ID.

In json output:

bash
$ dash0 logs query --filter "otel.log.severity.range is ERROR" -o json
{
  "dash0ExplorerUrl": "https://app.dash0.com/goto/logs?filter=...&from=now-15m&to=now",
  "resourceLogs": [
    ...
  ]
}

The field sits next to the payload rather than wrapping it, so a consumer reading .resourceLogs (or .issues, for failed-checks query) is unaffected. It is omitted entirely when no link could be built.

Note

logs query, spans query, and traces get emit OTLP/JSON, and dash0ExplorerUrl is a Dash0 extension to that document. A strict OpenTelemetry protobuf-JSON parser rejects unknown fields by default, so a consumer feeding this output directly into one must either enable its discard-unknown-fields option or strip the field first, for example with jq 'del(.dash0ExplorerUrl)'.

Which explorer each command opens:

CommandExplorer pageCarried in the link
logs query/goto/logs--filter, --from, --to, dataset
spans query/goto/traces/explorer--filter, --from, --to, dataset
failed-checks query/goto/alerting/failed-checks--filter, --status, --active, --from, --to, dataset
traces get/goto/traces/explorertrace ID, dataset

On failed-checks query, --status and --active are expanded into their equivalent dash0.issue.status and dash0.issue.end_time filters before the link is built, so they are carried like any other filter. metrics instant prints no deep link.

Two more details are worth knowing before scripting against this:

  • Emitted even when nothing matched. A query with no results prints No log records found. and still offers the link, so the empty result can be inspected in the UI.
  • Omitted when the web app host cannot be derived. The link is built from the API URL by replacing the host with app. plus the last two labels of the host, so https://api.eu-west-1.aws.dash0.com yields https://app.dash0.com. If the host has a single label, such as localhost, or is an IP address, such as http://127.0.0.1:8080, the link is skipped. A trailing dot in the host, such as https://api.dash0.com., is ignored.

The dataset parameter is omitted when the resolved dataset is default, since the web app opens that dataset anyway. --skip-header affects only the header row of table and csv output, not the link.

Send commands

Send commands transmit telemetry data to Dash0 via OTLP. They share a common set of characteristics:

  • Require otlp-url and auth-token (not api-url).
  • Repeatable attribute flags: --resource-attribute, --scope-attribute, and a signal-specific attribute flag.
  • OTLP scope flags: --scope-name (default: dash0-cli), --scope-version (default: CLI version).
Important

The Dash0 OTLP ingress does not accept OAuth access tokens — it only honors static auth_* tokens. Send commands running against an OAuth-typed profile fail upfront with a clear error instead of producing a generic 401 from the server. Workarounds, in order of least-invasive:

  1. Pass --auth-token auth_<...> for the single invocation.
  2. Set DASH0_AUTH_TOKEN=auth_<...> in the environment (shadows the profile for any one command).
  3. Convert the profile to a static token with dash0 config profiles update <name> --oauth=false --auth-token auth_<...> --force.

logs send

Send a log record to Dash0 via OTLP. Requires otlp-url and auth-token.

bash
dash0 logs send <body> [flags]

Key flags:

FlagDescription
--severity-number <1-24>OpenTelemetry severity number; determines the severity range in Dash0
--severity-text <text>Severity text (e.g., INFO, WARN, ERROR); separate from severity-number
--event-name <name>Event name (e.g., dash0.deployment)
--resource-attribute <key=value>Resource attribute (repeatable)
--log-attribute <key=value>Log record attribute (repeatable)
--scope-attribute <key=value>Instrumentation scope attribute (repeatable)
--scope-name <name>Instrumentation scope name (default: dash0-cli)
--scope-version <version>Instrumentation scope version (default: CLI version)
--time <RFC3339>Log record timestamp (default: now)
--observed-time <RFC3339>Observed timestamp (default: now)
--trace-id <32 hex chars>Trace ID to correlate with
--span-id <16 hex chars>Span ID to correlate with
--flags <uint32>Log record flags
--resource-dropped-attributes-count <n>Number of dropped resource attributes
--log-dropped-attributes-count <n>Number of dropped log record attributes
--scope-dropped-attributes-count <n>Number of dropped scope attributes

Simple log message:

bash
$ dash0 logs send "Application started"
Log record sent

Log with severity and attributes:

bash
$ dash0 logs send "Application started" \
    --resource-attribute service.name=my-service \
    --log-attribute user.id=12345 \
    --severity-text INFO --severity-number 9
Log record sent

Deployment event with event name:

bash
$ dash0 logs send "Deployment completed" \
    --event-name dash0.deployment \
    --severity-number 9 \
    --resource-attribute service.name=my-service \
    --resource-attribute deployment.environment.name=production \
    --log-attribute deployment.status=succeeded
Log record sent

Using environment variables for connection (env-var prefix counts as part of a single command per the code block rules):

bash
$ DASH0_OTLP_URL=https://ingress.us-west-2.aws.dash0.com \
  DASH0_AUTH_TOKEN=auth_xxx \
  dash0 logs send "Health check passed" \
    --severity-number 9 --severity-text INFO
Log record sent

spans send

Send a span to Dash0 via OTLP. Requires otlp-url and auth-token.

bash
dash0 spans send --name <name> [flags]
FlagDefaultDescription
--nameSpan name (required)
--kindINTERNALSpan kind: INTERNAL, SERVER, CLIENT, PRODUCER, CONSUMER
--status-codeUNSETStatus code: UNSET, OK, ERROR
--status-messageStatus message (typically for ERROR status)
--start-timenowStart timestamp in RFC3339 format
--end-timeEnd timestamp in RFC3339 format; mutually exclusive with --duration
--durationSpan duration (e.g., 100ms, 1.5s); mutually exclusive with --end-time
--trace-idautoTrace ID (32 hex characters); auto-generated if omitted
--span-idautoSpan ID (16 hex characters); auto-generated if omitted
--parent-span-idParent span ID (16 hex characters)
--resource-attributeResource attribute as key=value (repeatable)
--span-attributeSpan attribute as key=value (repeatable)
--span-linkSpan link as trace-id:span-id[,key=value,...] (repeatable)
--scope-namedash0-cliInstrumentation scope name
--scope-versionCLI versionInstrumentation scope version
--scope-attributeInstrumentation scope attribute as key=value (repeatable)

Send a simple span:

bash
$ dash0 spans send --name "my-operation"
Span sent (trace-id: 0af7651916cd43dd8448eb211c80319c, span-id: b7ad6b7169203331)

Send a server span with duration:

bash
$ dash0 spans send --name "GET /api/users" \
    --kind SERVER --status-code OK --duration 100ms \
    --resource-attribute service.name=my-service
Span sent (trace-id: ..., span-id: ...)

Send a span with a link to another trace:

bash
dash0 spans send --name "process-message" \
    --kind CONSUMER \
    --span-link 0af7651916cd43dd8448eb211c80319c:b7ad6b7169203331

Send a child span with explicit parent:

bash
dash0 spans send --name "db-query" \
    --kind CLIENT \
    --trace-id 0af7651916cd43dd8448eb211c80319c \
    --parent-span-id b7ad6b7169203331

Daemon commands

Daemon commands run as long-lived foreground processes and exit on SIGINT or SIGTERM rather than after a single operation. They write a startup banner to stderr, accept traffic until signaled, then drain in-flight work within a bounded deadline before exiting.

otlp proxy (experimental)

Run a local OTLP forwarder that accepts OTLP/HTTP and OTLP/gRPC traffic on 127.0.0.1 and forwards every batch to Dash0 using the active profile's credentials. Requires the -X (or --experimental) flag.

The proxy is a local-dev shortcut for the common "I want telemetry in Dash0 right now while iterating on my code" loop. An OpenTelemetry SDK at default endpoint configuration (OTEL_EXPORTER_OTLP_ENDPOINT unset or pointing at 127.0.0.1:4318 / 4317) connects with no extra setup.

Note

The proxy is not a replacement for the OpenTelemetry Collector. It does not buffer outbound on Dash0 outages. Backpressure surfaces to SDKs as HTTP 503 or gRPC UNAVAILABLE with Retry-After honored by the SDK.

bash
dash0 -X otlp proxy [flags]
FlagDefaultDescription
--http-port4318TCP port for the OTLP/HTTP listener
--grpc-port4317TCP port for the OTLP/gRPC listener
--tailfalsePrint every forwarded record on stdout in collector-debug-exporter style (incompatible with --agent-mode)
--resource-attributeResource attribute as key=value to upsert into every forwarded batch (repeatable)
--scope-attributeInstrumentation-scope attribute as key=value to upsert into every forwarded batch (repeatable)
--scope-nameInstrumentation-scope name to set on every forwarded batch (default: preserve the SDK's value)
--scope-versionInstrumentation-scope version to set on every forwarded batch (default: preserve the SDK's value)
--log-attributeAttribute as key=value to upsert on every forwarded log record (repeatable)
--span-attributeAttribute as key=value to upsert on every forwarded span (repeatable)
--metric-attributeAttribute as key=value to upsert on every forwarded metric data point (repeatable)

Outbound decoration

The decoration flags upsert values onto every forwarded pdata batch at three levels:

  • Resource level (--resource-attribute) — applied to each ResourceLogs, ResourceSpans, or ResourceMetrics resource. This is the level Dash0 indexes for filtering.
  • Scope level (--scope-attribute, --scope-name, --scope-version) — applied to each instrumentation scope.
  • Record level (--log-attribute, --span-attribute, --metric-attribute) — applied to every individual log record, span, or metric data point of the corresponding signal type. Per-signal flags don't cross signal boundaries: a --log-attribute never lands on a span.

The flag shape mirrors dash0 logs send and dash0 spans send so the user experience is consistent across signal-authoring and signal-forwarding workflows.

When a key collides with one the inbound SDK already set (e.g., --resource-attribute service.name=foo against an SDK-set service.name), the flag value wins. Unlike the send commands, --scope-name and --scope-version default to empty — the proxy preserves the SDK's instrumentation-library identity unless the user explicitly overrides it.

The default ports follow the OTLP specification. If either port is already in use, the proxy exits non-zero with an actionable error that names the holding process (resolved via lsof on Unix) and points at the --http-port / --grpc-port override:

HTTP port 4318 is already in use by "otelcol-contrib" (PID 12345)
  Stop that process, or pass --http-port <N> to use another port (cause: …)

A silent fallback to an OS-assigned port was considered but discarded — when an SDK is still pointed at the original default, the proxy starting on a different port produces an invisible "no telemetry" failure that's painful to debug.

Environment variables

VariableDescription
DASH0_OTLP_PROXY_HTTP_PORTOverride for --http-port
DASH0_OTLP_PROXY_GRPC_PORTOverride for --grpc-port
OTEL_EXPORTER_OTLP_ENDPOINTParsed; routed to HTTP or gRPC by OTEL_EXPORTER_OTLP_PROTOCOL
OTEL_EXPORTER_OTLP_PROTOCOLgrpc, http/protobuf, or http/json; disambiguates the endpoint

Precedence per port flag (high to low):

  1. Explicit --http-port or --grpc-port on the command line
  2. DASH0_OTLP_PROXY_*
  3. OTEL_EXPORTER_OTLP_ENDPOINT (parsed; routed by OTEL_EXPORTER_OTLP_PROTOCOL)
  4. Built-in default (4318 HTTP, 4317 gRPC)

Start banner

On startup the proxy writes a single banner line to stderr listing both endpoints, the active profile name, and the resolved dataset.

dash0 otlp proxy listening — http://127.0.0.1:4318 (OTLP/HTTP), 127.0.0.1:4317 (OTLP/gRPC) — profile: dev (dataset: default)

In TTY mode the banner is followed by a live per-signal stats block on stderr that updates once per second:

   logs:    42/s ▁▂▄▆▇ 1234 total
  spans:    18/s ▁▂▃▄▅  540 total
metrics:     0/s ▁▁▁▁▁    0 total

Each signal occupies its own line; labels, rates, sparklines, and totals all right-align so the eye can scan vertically. The sparkline width adapts to the terminal: wider terminals show more of the 30-sample rolling history. The block redraws in place via ANSI cursor controls. When stderr is not a TTY (piped to a file or another process), the block is suppressed but lifecycle messages still print as plain lines.

Failure modes

The proxy implements async-forward semantics per the OTLP specification: an HTTP 200 / gRPC OK to the SDK means "accepted at this node" — the actual upstream forward happens asynchronously on the worker pool.

When the per-signal queue saturates (128 deep), the receiver returns HTTP 503 (or gRPC UNAVAILABLE) and the SDK retries with exponential backoff. On upstream errors, the worker pool classifies the outcome:

ClassificationTriggers
upstream_unreachableNetwork errors, DNS failures, no response
upstream_5xxDash0 returns 500-599
upstream_4xx_authDash0 returns 401 or 403; surfaces a throttled stderr warning
upstream_4xx_otherDash0 returns 400, 404, 422, etc.
internal_panicA worker panicked (caught and emitted; the worker restarts)

The first 401 or 403 from upstream writes a one-shot stderr warning ("authentication to Dash0 failed; check your profile"). Subsequent auth failures within 30 seconds are suppressed to avoid filling the terminal.

Agent mode

When --agent-mode is active, the proxy emits NDJSON OTLP/JSON event records on stdout instead of human-readable output. Each record is one log record with a dash0.cli.otlp_proxy.* event name. Stats redraw on stderr is suppressed and --tail is rejected with an error (agents already see batches through the structured event stream).

Event names and key attributes:

event_nameAttributes
dash0.cli.otlp_proxy.startedendpoint.http, endpoint.grpc, dataset, profile.name
dash0.cli.otlp_proxy.forwardedsignal (logs, spans, metrics), count, bytes
dash0.cli.otlp_proxy.statslogs.rate, logs.total, logs.failed, spans.rate, spans.total, spans.failed, metrics.rate, metrics.total, metrics.failed
dash0.cli.otlp_proxy.errorerror.kind (per the failure-modes table), reason, code (HTTP status when available)
dash0.cli.otlp_proxy.shutdownreason (signal or deadline), final_total.logs, final_total.spans, final_total.metrics

Every event record carries the resource attributes service.name="dash0-cli" and service.instance.id=<uuid> so multiple proxy instances are distinguishable in the event stream.

Shutdown

The proxy listens for SIGINT (Ctrl-C) and SIGTERM. On signal, it stops accepting new traffic, drains in-flight RPCs and worker queues within a 5-second deadline, emits the shutdown event with final cumulative totals, and exits zero. A drain that hits the deadline still exits zero — the reason attribute on the shutdown event distinguishes the two cases.

Startup failures (missing profile, both listener ports unavailable) exit non-zero before the banner.

Examples

Just run it

SDK defaults already point at 127.0.0.1:4318 (HTTP) and 127.0.0.1:4317 (gRPC) so no environment variable change is required on the SDK side.

bash
$ dash0 -X otlp proxy
dash0 otlp proxy listening — http://127.0.0.1:4318 (OTLP/HTTP), 127.0.0.1:4317 (OTLP/gRPC) — profile: dev (dataset: default)
   logs:    42/s ▁▂▄▆▇ 1234 total
  spans:    18/s ▁▂▃▄▅  540 total
metrics:     0/s ▁▁▁▁▁    0 total
Override the listener ports
bash
# Move the HTTP listener; keep the gRPC default.
$ dash0 -X otlp proxy --http-port 8318

# Move both, e.g. when another local Collector is on 4317/4318.
$ dash0 -X otlp proxy --http-port 8318 --grpc-port 8317

If a port is already in use, the proxy fails with an actionable error that names the holder (resolved via lsof on Unix):

HTTP port 4318 is already in use by "otelcol-contrib" (PID 12345)
  Stop that process, or pass --http-port <N> to use another port (cause: …)
Watch the forwarded data

The --tail flag prints every forwarded record on stdout in the same style as the OpenTelemetry Collector's debug exporter — useful for verifying SDK output before going to the Dash0 UI.

bash
$ dash0 -X otlp proxy --tail
dash0 otlp proxy listening — http://127.0.0.1:4318 (OTLP/HTTP), 127.0.0.1:4317 (OTLP/gRPC) — profile: dev (dataset: default)
ResourceLogs #0
Resource attributes:
  service.name: Str("frontend")
ScopeLogs #0
ScopeLogs SchemaURL:
InstrumentationScope dash0-cli v1
LogRecord #0
ObservedTimestamp: 2026-06-12T10:08:42.123Z
Timestamp: 2026-06-12T10:08:42.123Z
SeverityText: INFO
SeverityNumber: 9 (INFO)
Body: Str("Application started successfully")
...
Tag forwarded data for filtering

The decoration flags upsert attributes onto every forwarded batch at three levels: resource (filterable in Dash0), scope, and per-record.

bash
# Add a developer-specific tag at the resource level so each developer's
# data is filterable in the Dash0 UI even on a shared backend.
$ dash0 -X otlp proxy \
    --resource-attribute developer=alice \
    --resource-attribute deployment.environment.name=local

# Tag the environment at the resource level (filterable) and mark every
# individual span and log as having flowed through your proxy.
$ dash0 -X otlp proxy \
    --resource-attribute deployment.environment.name=local \
    --span-attribute proxy.tagged=true \
    --log-attribute proxy.tagged=true \
    --metric-attribute proxy.tagged=true

# Override the instrumentation-scope identity on every forwarded batch.
# By default the proxy preserves the SDK's scope name and version; these
# flags explicitly overwrite them.
$ dash0 -X otlp proxy \
    --scope-name dash0-cli-otlp-proxy \
    --scope-version v1

Resource attribute keys collide with values the SDK already set; the flag's value wins:

bash
# The SDK has set service.name=frontend; this overrides it to "frontend-staging".
$ dash0 -X otlp proxy --resource-attribute service.name=frontend-staging
Agent mode

When --agent-mode is active, the proxy emits one NDJSON OTLP/JSON event record per line on stdout. The stats redraw on stderr is suppressed; --tail is incompatible (agents already see batches through the structured event stream).

bash
$ dash0 --agent-mode -X otlp proxy
{"resourceLogs":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"dash0-cli"}},...]},"scopeLogs":[{"scope":{"name":"dash0.cli.otlp_proxy"},"logRecords":[{"timeUnixNano":"...","attributes":[{"key":"endpoint.http","value":{"stringValue":"127.0.0.1:4318"}},...],"eventName":"dash0.cli.otlp_proxy.started"}]}]}]}
{"resourceLogs":[{...,"eventName":"dash0.cli.otlp_proxy.forwarded","attributes":[{"key":"signal","value":{"stringValue":"logs"}},{"key":"count","value":{"intValue":"3"}},...]}]}
...
Use with telemetrygen for a quick smoke test

telemetrygen generates synthetic OTLP data, which is convenient for verifying the proxy without running a real SDK.

bash
# In one terminal: start the proxy.
$ dash0 -X otlp proxy

# In another: send 10 traces over gRPC, 20 logs over HTTP, and 5 metrics over gRPC.
$ telemetrygen traces  --otlp-insecure                  --otlp-endpoint 127.0.0.1:4317 --traces 10
$ telemetrygen logs    --otlp-insecure --otlp-http      --otlp-endpoint 127.0.0.1:4318 --logs 20
$ telemetrygen metrics --otlp-insecure                  --otlp-endpoint 127.0.0.1:4317 --metrics 5

The proxy's stats block updates in place as the data flows through, then the records appear in the Dash0 UI under the active profile's dataset.

Organizational commands

Organizational commands manage entities (teams, members, notification channels, datasets, auth tokens, Agent0 skills, AWS metric scrape configs) that are scoped to the organization, not to a dataset. They share a common set of characteristics:

  • No --dataset flag.
  • All are experimental and require the -X flag.
  • Use api-url and auth-token.

Most organizational commands use flag-based input. Notification channels, datasets, auth tokens, Agent0 skills, and AWS metric scrape configs are exceptions: they use file-based input (-f) and support --dry-run.

notification-channels list (experimental)

List all notification channels in the organization.

bash
dash0 -X notification-channels list [-o <format>] [--skip-header] [--column <col>]
FlagDefaultDescription
-otableOutput format: table, json, yaml, or csv
--skip-headerfalseOmit the header row from table and csv output
--columnColumn to display (repeatable; table and csv only)

Example:

bash
$ dash0 -X notification-channels list
NAME                  TYPE         ID                  ORIGIN       URL
Slack Alerts          slack        abc-123-def-456     my-origin    https://app.dash0.com/goto/settings/notifications?channel_id=abc-123-def-456
PagerDuty On-Call     pagerduty    def-456-ghi-789     -            https://app.dash0.com/goto/settings/notifications?channel_id=def-456-ghi-789
Email Digest          email_v2     ghi-789-jkl-012     -            https://app.dash0.com/goto/settings/notifications?channel_id=ghi-789-jkl-012

Column aliases: name / channel name, type / channel type, id / channel id, origin, url.

Aliases: ls

notification-channels get (experimental)

Get a notification channel definition by ID or origin.

bash
dash0 -X notification-channels get <id> [-o <format>]

The <id> argument can be a notification channel ID or origin.

Example:

bash
$ dash0 -X notification-channels get <id>
Kind:  Dash0NotificationChannel
Name:  Slack Alerts
Type:  slack
ID:    abc-123-def-456
Origin: my-origin
URL:   https://app.dash0.com/goto/settings/notifications?channel_id=abc-123-def-456

Use -o yaml to get the full CRD definition:

bash
$ dash0 -X notification-channels get <id> -o yaml
kind: Dash0NotificationChannel
metadata:
  name: Slack Alerts
  labels:
    dash0.com/id: abc-123-def-456
    dash0.com/origin: my-origin
spec:
  type: slack
  config: ...

notification-channels create (experimental)

Create a notification channel from a YAML or JSON definition file. If the definition contains a dash0.com/origin label, the channel is created or replaced (PUT). Otherwise, a new channel is created (POST) and the server assigns an ID. A definition carrying a non-empty spec.routing.assets triggers a warning: the field is API-managed (a server-derived back-reference) and ignored on write, and existing bindings are unaffected. Bind check rules via their dash0.com/notification-channel-ids annotation, and synthetic checks via their spec.notifications.channels. Exported definitions never carry the field — get and list omit spec.routing.assets from -o yaml and -o json output — so get → edit → apply/update roundtrips stay warning-free. The same warning applies to notification-channels update and apply.

bash
dash0 -X notification-channels create -f <file> [--dry-run]
FlagDescription
-fPath to YAML or JSON definition file (use - for stdin)
--dry-runValidate without creating

Create from a YAML file:

bash
$ dash0 -X notification-channels create -f channel.yaml
Notification channel "Slack Alerts" created (id: abc-123).

Create from stdin (the cat | dash0 … pipeline is a single command):

bash
cat channel.yaml | dash0 -X notification-channels create -f -

Validate without creating:

bash
$ dash0 -X notification-channels create -f channel.yaml --dry-run
Dry run: notification channel definition is valid

Aliases: add

notification-channels update (experimental)

Update an existing notification channel from a YAML or JSON definition file. If the ID argument is omitted, the ID is extracted from the file content.

bash
dash0 -X notification-channels update [id] -f <file> [--dry-run]

Update a notification channel from a file:

bash
dash0 -X notification-channels update <id> -f channel.yaml

Update using the ID embedded in the file content:

bash
dash0 -X notification-channels update -f channel.yaml

notification-channels delete (experimental)

Delete a notification channel by ID or origin. Prompts for confirmation unless --force is passed.

bash
dash0 -X notification-channels delete <id> [--force]

Example:

bash
$ dash0 -X notification-channels delete <id> --force
Notification channel deleted (id: <id>).

Aliases: remove

datasets list (experimental)

List all datasets in the organization.

bash
dash0 -X datasets list [-o <format>] [--skip-header] [--column <col>]
FlagDefaultDescription
-otableOutput format: table, wide, json, yaml, or csv
--skip-headerfalseOmit the header row from table, wide, and csv output
--columnColumn to display (repeatable; table, wide, and csv only)

The wide and csv formats add an ORIGIN column.

Example:

bash
$ dash0 -X datasets list
NAME        ID
Default     default
Staging     staging

Aliases: ls

datasets get (experimental)

Get a dataset definition by slug or origin.

bash
dash0 -X datasets get <id> [-o <format>]

Example:

bash
$ dash0 -X datasets get <id>
Kind:   Dash0Dataset
Name:   Staging
ID:     staging
Origin: api-0b7e5d2a-1c3f-4e8a-9b6d-2f4a8c1e7d90

Use -o yaml to get the full definition, suitable for editing and re-applying.

datasets create (experimental)

Create a dataset from a YAML or JSON definition file. The slug, in spec.slug or metadata.labels["dash0.com/id"], is required and cannot change after creation. If a dataset with that slug already exists, the command updates it. If the slug belongs to a dataset deleted in the last 30 days, the command restores that dataset: a view created in it before the delete is back after the create. Only the creation time and the version reset, and the settings come from the request. apiVersion: dash0.com/v1alpha1 is required. A dataset document has no telemetry filters, and creating or updating a dataset never changes them.

bash
dash0 -X datasets create -f <file> [--dry-run]
FlagDescription
-fPath to YAML or JSON definition file (use - for stdin)
--dry-runValidate without creating

Create from a YAML file:

bash
$ dash0 -X datasets create -f dataset.yaml
Dataset "Staging" created (id: staging)

Validate without creating:

bash
$ dash0 -X datasets create -f dataset.yaml --dry-run
Dry run: dataset definition is valid

Aliases: add

datasets update (experimental)

Update an existing dataset from a YAML or JSON definition file. If the ID argument is omitted, the slug is extracted from the file content. The argument can be the slug or the origin; an origin must match the origin in the file when the file has one. The dataset must already exist: the command fails with a "not found" error instead of creating it. A spec field left out of the file keeps its stored value, so a file with only spec.retention.logs changes only that field. --dry-run shows the same result: the file merged onto the stored dataset. A missing or unknown apiVersion fails before any API call. The output is a unified diff of the before and after states.

bash
dash0 -X datasets update [id] -f <file> [--dry-run]

Update a dataset from a file:

bash
dash0 -X datasets update -f dataset.yaml

datasets delete (experimental)

Delete a dataset by slug or origin. Prompts for confirmation unless --force is passed. In agent mode (--agent-mode or DASH0_AGENT_MODE=1, also auto-detected from agent env vars like CLAUDE_CODE), datasets delete requires an explicit --force and otherwise refuses with an error. A delete starts the 30-day countdown to removing the dataset and its assets, so, like dash0 logout, it needs deliberate intent instead of the usual agent-mode auto-confirmation. The default dataset cannot be deleted: the API answers with a 400 error. The API answers a slug that does not exist with 2xx, so delete <typo> prints deleted and exits 0.

Deletion is soft. Dash0 keeps the dataset for 30 days, and creating a dataset with the same slug in that time restores it: a view created in the dataset before the delete is back after the create. Only the creation time and the version reset, and the settings come from the request. After 30 days, Dash0 removes the dataset, its permissions, and its assets. Dashboards, check rules, synthetic checks, and views are kept until then. Telemetry is removed as its retention expires, not by the delete.

bash
dash0 -X datasets delete <id> [--force]

Example:

bash
$ dash0 -X datasets delete <id>
Are you sure you want to delete dataset "<id>"? Dashboards, check rules, synthetic checks and views are kept for 30 days; creating the same slug within that time restores them. Telemetry is removed as its retention expires. [y/N]: y
Dataset "<id>" deleted

Aliases: remove

agent0 skills list (experimental)

List the Agent0 custom skills you can read in the organization.

bash
dash0 -X agent0 skills list [-o <format>] [--skip-header] [--column <col>] [--origin-prefix <prefix>] [--enabled[=false]]
FlagDefaultDescription
-otableOutput format: table, wide, json, yaml, or csv
--skip-headerfalseOmit the header row from table, wide, and csv output
--columnColumn to display (repeatable; table, wide, and csv only)
--origin-prefixOnly list skills whose origin starts with this prefix
--enabledOnly list skills that are on (--enabled) or off (--enabled=false) for you; omit to list both

The wide and csv formats add ORIGIN and ENABLED columns. A skill is on or off per user; for an API token without a user, every readable skill counts as enabled.

Example:

bash
$ dash0 -X agent0 skills list
NAME              ID
incident-triage   cskl_01jb8k3m4n5p6q7r8s9t0v1w2x
release-notes     cskl_01jb8k3m4n5p6q7r8s9t0v1w2y

Aliases: ls

agent0 skills get (experimental)

Get an Agent0 custom skill, including its files and permissions, by ID or origin.

bash
dash0 -X agent0 skills get <id> [-o <format>]

Example:

bash
$ dash0 -X agent0 skills get dash0-cli_incident-triage
Kind:    Dash0Skill
Name:    incident-triage
ID:      cskl_01jb8k3m4n5p6q7r8s9t0v1w2x
Origin:  dash0-cli_incident-triage
Enabled: true
Files:
  SKILL.md
  references/runbook.md

Use -o yaml to get the full definition, suitable for editing and re-applying. spec.permissions, defaultEnabled included, round-trips through the export.

agent0 skills create (experimental)

Create an Agent0 custom skill from a YAML or JSON definition file. The file must carry a SKILL.md in spec.files; the skill's name is the name in its frontmatter. When the file sets dash0.com/origin, the command upserts by that origin, so a skill with that origin is updated. spec.source and metadata.annotations["dash0.com/enabled"] are never sent.

bash
dash0 -X agent0 skills create -f <file> [--dry-run]
FlagDescription
-fPath to YAML or JSON definition file (use - for stdin)
--dry-runValidate without creating

Create from a YAML file:

bash
$ dash0 -X agent0 skills create -f skill.yaml
Agent0 skill "incident-triage" created (id: dash0-cli_incident-triage)

A name another skill already uses fails with a hint:

bash
$ dash0 -X agent0 skills create -f skill.yaml
Error: another Agent0 skill in this organization is already named "incident-triage":
  dash0 api error: Bad Request: ... Skill names must be unique per organization. (status: 400)
Hint: the name comes from the SKILL.md frontmatter and is unique per organization. Rename the skill, delete the other one, or set the other skill's metadata.labels["dash0.com/origin"] in this document to update it instead

Aliases: add

agent0 skills update (experimental)

Update an existing Agent0 custom skill from a YAML or JSON definition file. If the ID argument is omitted, the origin, or else the ID, is read from the file. The skill must already exist: the command fails with a "not found" error instead of creating it. The files in the definition replace the stored files. When spec.permissions is absent, the stored grants stay unchanged. A member who sets defaultEnabled on a grant they may not change gets an error that says which grants they may change. The output is a unified diff of the before and after states; --dry-run shows it without updating.

bash
dash0 -X agent0 skills update [id] -f <file> [--dry-run]

Update a skill from a file:

bash
dash0 -X agent0 skills update -f skill.yaml

agent0 skills delete (experimental)

Delete an Agent0 custom skill by ID or origin. Prompts for confirmation unless --force is passed.

bash
dash0 -X agent0 skills delete <id> [--force]

Example:

bash
$ dash0 -X agent0 skills delete dash0-cli_incident-triage --force
Agent0 skill "dash0-cli_incident-triage" deleted

Aliases: remove

auth-tokens list (experimental)

List all auth tokens in the organization. The output never contains a secret.

bash
dash0 -X auth-tokens list [-o <format>] [--skip-header] [--column <col>]
FlagDefaultDescription
-otableOutput format: table, wide, json, yaml, or csv
--skip-headerfalseOmit the header row from table, wide, and csv output
--columnColumn to display (repeatable; table, wide, and csv only)

The wide and csv formats add an ORIGIN column.

bash
$ dash0 -X auth-tokens list
NAME            ID                                    ACTIONS
CI ingest       6f1c0d1e-5b7a-4c2e-9a51-2b0c6c4b8a10  ingest:*
Read-only API   0b7e5d2a-1c3f-4e8a-9b6d-2f4a8c1e7d90  *:read

Aliases: ls

auth-tokens get (experimental)

Get an auth token by ID or origin. The output never contains the secret: the API returns it only when the token is created.

bash
dash0 -X auth-tokens get <id> [-o <format>]
bash
$ dash0 -X auth-tokens get <id>
Kind:    Dash0AuthToken
Name:    CI ingest
ID:      6f1c0d1e-5b7a-4c2e-9a51-2b0c6c4b8a10
Origin:  dash0-cli_ci-ingest
Actions: ingest:*
Created: 2026-10-01 10:00:00

Use -o yaml to get a definition you can edit and pass to auth-tokens update.

auth-tokens create (experimental)

Create an auth token from a YAML or JSON definition file. apply does not accept auth tokens yet, so this is the only way to create one from a file.

bash
dash0 -X auth-tokens create -f <file> [--secret-file <path>] [--allow-all-actions] [--dry-run] [-o <format>]
FlagDescription
-fPath to YAML or JSON definition file (use - for stdin)
--secret-fileWrite the secret to this new file, readable only by you
--allow-all-actionsAllow the definition to grant the * action
--dry-runValidate without creating
-oOutput format: table, json, or yaml; json and yaml never contain the secret

Definition:

yaml
apiVersion: dash0.com/v1alpha1
kind: Dash0AuthToken
metadata:
  name: CI ingest
  labels:
    dash0.com/origin: dash0-cli_ci-ingest
spec:
  actions:
    - ingest:*
  scope:
    datasets:
      restriction: restricted
      slugs:
        - default

The API returns a token's secret only in the response that creates it, so create delivers the secret before it returns, and decides where to deliver it before it calls the API:

  • On an interactive terminal, with agent mode off and the default output format, create prints the secret once on stdout and warns on stderr that it is shown only once.
  • With --secret-file <path>, create writes the secret and a newline to a new file with mode 0600. The path must not exist, so a symlink is refused too. A path inside a git repository is refused unless git ignores it. In CI, write the secret outside the checkout, for example to $RUNNER_TEMP on GitHub Actions.
  • In a pipe, in CI, in agent mode, or with -o json or -o yaml, --secret-file is required. Without it, create fails before it creates anything. --dry-run creates nothing, so it does not need --secret-file.

If the secret cannot be written or printed after the token is created, create deletes the token again and fails, because nobody would hold its secret. This cannot cover a create that stops before the API response arrives, for example after Ctrl-C or a network drop. The token can then exist with a secret nobody holds. Find it with auth-tokens list and delete it with auth-tokens delete.

metadata.name and spec.actions are required. dash0.com/origin is optional. When it is absent, Dash0 assigns an origin, so each create makes a new token. An origin that already exists is refused: use auth-tokens update to change that token. The * action gives the token full access to the organization, including its auth tokens, so granting it needs --allow-all-actions. --force and agent mode do not grant it.

Create a token on an interactive terminal:

bash
$ dash0 -X auth-tokens create -f token.yaml
Auth token "CI ingest" created (id: 6f1c0d1e-5b7a-4c2e-9a51-2b0c6c4b8a10, origin: dash0-cli_ci-ingest)
Store this secret now: it is shown only once, and Dash0 cannot show it again.
auth_...

Create a token in CI and write the secret to a file:

bash
$ dash0 -X auth-tokens create -f token.yaml --secret-file "$RUNNER_TEMP/ingest-token"
Auth token "CI ingest" created (id: 6f1c0d1e-5b7a-4c2e-9a51-2b0c6c4b8a10, origin: dash0-cli_ci-ingest)
Secret written to /home/runner/work/_temp/ingest-token

Aliases: add

auth-tokens update (experimental)

Update an existing auth token from a YAML or JSON definition file. If the ID argument is omitted, the origin or ID is taken from the file. The token must exist: update fails with "not found" and never creates a token. The secret does not change and is never shown. A spec field left out of the file keeps its stored value. Granting the * action needs --allow-all-actions, as for create. The output is a unified diff of the before and after states.

bash
dash0 -X auth-tokens update [id] -f <file> [--allow-all-actions] [--dry-run]

Rename a token from an exported definition:

bash
$ dash0 -X auth-tokens update -f token.yaml
--- Auth token (before)
+++ Auth token (after)
@@ -3,7 +3,7 @@
 metadata:
   labels:
     dash0.com/origin: dash0-cli_ci-ingest
-  name: CI ingest
+  name: CI ingest (staging)
 spec:
   actions:
   - ingest:*

auth-tokens delete (experimental)

Delete an auth token by ID or origin. Anything that uses the token loses access at once, and the deletion cannot be undone. Prompts for confirmation unless --force is passed. In agent mode, auth-tokens delete requires an explicit --force, as datasets delete does. The last auth token of an organization cannot be deleted: the API answers with a 400 error. With --force, a token that is already gone counts as deleted.

bash
dash0 -X auth-tokens delete <id> [--force]
bash
$ dash0 -X auth-tokens delete <id> --force
Auth token "<id>" deleted

Aliases: remove

aws-metric-scrape-configs get (experimental)

Show the CloudWatch metric scrape config of an AWS integration.

bash
dash0 -X aws-metric-scrape-configs get <integration-id> [-o <format>]
FlagDefaultDescription
-otableOutput format: table, json, or yaml

Every AWS integration has a config, so an integration without one shows no namespaces instead of an error. An unknown integration id fails with AWS integration "<id>" not found.

bash
$ dash0 -X aws-metric-scrape-configs get 27755ed0-0009-422d-8c11-19c6dd72df98
Kind: AWS metric scrape config
Integration: production-account
Integration ID: 27755ed0-0009-422d-8c11-19c6dd72df98
Dataset: default
Origin: api-f5036b48-c11d-4998-a8f2-9dcb6f95dccd
Namespaces:
  AWS/Lambda (2 metrics)
  AWS/SQS (2 metrics)
Created: 2026-10-29 10:52:45
Updated: 2026-10-29 10:52:45

Use -o yaml to get a definition that aws-metric-scrape-configs update -f and apply -f accept unchanged:

bash
dash0 -X aws-metric-scrape-configs get 27755ed0-0009-422d-8c11-19c6dd72df98 -o yaml > scrape-config.yaml

aws-metric-scrape-configs update (experimental)

Replace the CloudWatch metric scrape config of an AWS integration with the config in a YAML or JSON file. There is no create: each integration has exactly one config, and update replaces it whether or not the integration had one. If the integration id argument is omitted, it is taken from the document's dash0.com/id label; when both are given, they must match. The document is validated before any API call, as described for apply. The output is a unified diff of the before and after states, or created when the integration had no config before.

bash
dash0 -X aws-metric-scrape-configs update [integration-id] -f <file> [--dry-run]
FlagDescription
-fPath to YAML or JSON definition file (use - for stdin)
--dry-runShow the diff without applying it

Stop scraping the AWS/SQS namespace by removing it from an exported config:

bash
$ dash0 -X aws-metric-scrape-configs update -f scrape-config.yaml
--- AWS metric scrape config (before)
+++ AWS metric scrape config (after)
@@ -7,8 +7,4 @@
     - Errors
     - Invocations
     namespace: AWS/Lambda
-  - metrics:
-    - ApproximateAgeOfOldestMessage
-    - NumberOfMessagesSent
-    namespace: AWS/SQS

Preview the change without applying it:

bash
dash0 -X aws-metric-scrape-configs update -f scrape-config.yaml --dry-run

aws-metric-scrape-configs delete (experimental)

Clear the CloudWatch metric scrape config of an AWS integration. Dash0 stops scraping CloudWatch metrics for the integration, and the integration itself is kept. Prompts for confirmation unless --force is passed. With --force, an integration that no longer exists counts as cleared.

bash
dash0 -X aws-metric-scrape-configs delete <integration-id> [--force]
bash
$ dash0 -X aws-metric-scrape-configs delete 27755ed0-0009-422d-8c11-19c6dd72df98 --force
AWS metric scrape config of integration "27755ed0-0009-422d-8c11-19c6dd72df98" cleared

Aliases: remove

teams list (experimental)

List all teams in the organization.

bash
dash0 -X teams list [-o <format>] [--skip-header] [--column <col>]
FlagDefaultDescription
-otableOutput format: table, json, or csv
--skip-headerfalseOmit the header row from table and csv output
--columnColumn to display (repeatable; table and csv only)

Example:

bash
$ dash0 -X teams list
NAME            ID          MEMBERS  ORIGIN       URL
Backend Team    a1b2c3d4    3        dash0-cli    https://app.dash0.com/goto/settings/teams?team_id=a1b2c3d4
Frontend Team   b2c3d4e5    2                     https://app.dash0.com/goto/settings/teams?team_id=b2c3d4e5

Column aliases: name / team name, id / team id, members / member count, origin, url.

Aliases: ls

teams get (experimental)

Get detailed information about a team, including members and accessible assets.

bash
dash0 -X teams get <id> [-o <format>]

The <id> argument can be a team ID or origin.

Example:

bash
$ dash0 -X teams get <id>
Kind:    Team
Name:    Backend Team
ID:      a1b2c3d4-5678-90ab-cdef-1234567890ab
Origin:  dash0-cli
Color:   #FF6B6B -> #4ECDC4
Members: 2
...

teams create (experimental)

Create a team. Two modes are supported.

Declarative — read a TeamDefinitionV1Alpha1 YAML/JSON document. Origin wins over id when both labels are present, and dash0.com/origin upserts via PUT (create-or-replace). When the origin is not found but the id is, the team is updated at the id. When only dash0.com/id is present the CLI preflights GET /api/teams/{id}: on hit it PUTs (idempotent update — this is what makes reapplying a YAML downloaded from the Dash0 platform UI a no-op), on 404 it falls back to POST (cross-org apply spawns a fresh team with a server-assigned id), and any other error surfaces. A document with neither label is created via POST and the server assigns id and origin. See the Asset identifiers and idempotent upsert section for the full rationale.

bash
dash0 -X teams create -f <file>

Imperative — build a minimal team envelope from flags.

bash
dash0 -X teams create <name> [--color-from <hex>] [--color-to <hex>] [--member <id-or-email>]
FlagDescription
-f, --filePath to a YAML or JSON TeamDefinitionV1Alpha1 document (use - for stdin); mutually exclusive with the imperative flags
--color-fromGradient start color (e.g. "#FF0000"); imperative form only
--color-toGradient end color (e.g. "#00FF00"); imperative form only
--memberMember (id or email) to add to the team, repeatable; imperative form only. Emails are resolved to member ids server-side

Declarative example — reapply a team YAML downloaded from the Dash0 UI:

bash
$ dash0 -X teams create -f team.yaml
Team "Backend Team" updated (id: team_01k5vpx97efdnrkqan15b41k84)

Declarative from stdin (the cat | dash0 … pipeline is a single command):

bash
cat team.yaml | dash0 -X teams create -f -

Imperative example:

bash
$ dash0 -X teams create "Backend Team" --color-from "#FF6B6B" --color-to "#4ECDC4"
Team "Backend Team" created (id: a1b2c3d4-...)

Aliases: add

teams update (experimental)

Update a team from a YAML or JSON TeamDefinitionV1Alpha1 document.

bash
dash0 -X teams update [<id>] -f <file> [--dry-run]

The file must have the same shape teams create -f accepts and teams get -o yaml produces, so the export → edit → reapply loop round-trips cleanly. If the positional <id> argument is omitted, the CLI derives the target team from the document's dash0.com/origin label (preferred) or dash0.com/id label — matching the upsert-key precedence in the Asset identifiers and idempotent upsert section. When both a positional <id> and one of the labels are present, the argument must match the origin or the id in the file; otherwise the command fails before any API call.

Unlike teams create -f, teams update -f does not create a new team on 404 — the team must already exist. The output is a unified diff of the before and after states, with spec.members rendered as email addresses so membership changes are legible.

Use -f - to read from stdin. The --dry-run flag prints the diff without applying the update.

Update a team from a file (id resolved from the file's dash0.com/origin or dash0.com/id):

bash
$ dash0 -X teams update -f team.yaml
--- Team (before)
+++ Team (after)
@@ -2,7 +2,7 @@
 spec:
   display:
-    name: Backend Team
+    name: Backend Team (renamed)

Update using an explicit id (validated against the file's origin/id):

bash
dash0 -X teams update <id> -f team.yaml

Update from stdin (the cat … | dash0 … pipeline counts as one command):

bash
cat team.yaml | dash0 -X teams update -f -

Preview the diff without mutating:

bash
dash0 -X teams update -f team.yaml --dry-run

Export → edit → reapply (idempotent when the YAML is unchanged):

bash
$ dash0 -X teams get <id> -o yaml > team.yaml
$ # edit team.yaml, then:
$ dash0 -X teams update -f team.yaml
Team "Backend Team": no changes

Deprecated: imperative flags

The pre-existing imperative flags — --name, --color-from, --color-to — are deprecated in favor of -f/--file, but continue to work for backward compatibility. Each use prints a one-line deprecation warning to stderr. The imperative form can only mutate the team's display settings; spec.members and other fields require -f.

bash
$ dash0 -X teams update <id> --name "New Team Name"
Flag --name has been deprecated, use -f/--file with a TeamDefinitionV1Alpha1 document instead
Team "<id>" updated

teams delete (experimental)

Delete a team. Prompts for confirmation unless --force is passed.

bash
dash0 -X teams delete <id> [--force]

Example:

bash
$ dash0 -X teams delete <id> --force
Team "<id>" deleted

Aliases: remove

teams list-members (experimental)

List all members of a team.

bash
dash0 -X teams list-members <team-id> [-o <format>] [--skip-header] [--column <col>]
FlagDefaultDescription
-otableOutput format: table, json, or csv
--skip-headerfalseOmit the header row from table and csv output
--columnColumn to display (repeatable; table and csv only)

Example:

bash
$ dash0 -X teams list-members <team-id>
NAME              EMAIL                  ID
Alice Smith       alice@example.com      m1-0000-0000-0000-000000000001
Bob Jones         bob@example.com        m2-0000-0000-0000-000000000002

Column aliases: name / member name, email, id / member id.

teams add-members (experimental)

Add one or more existing organization members to a team. Members can be specified by ID or email address. When an email address is provided, it is resolved to a member ID via the members list API.

bash
dash0 -X teams add-members <team-id> <member-id-or-email> [<member-id-or-email>...]

Add members by ID:

bash
$ dash0 -X teams add-members <team-id> <member-id-1> <member-id-2>
2 members added to team "<team-id>"

Add a member by email address:

bash
$ dash0 -X teams add-members <team-id> <email-address>
1 member added to team "<team-id>"

Mix of IDs and email addresses (a single invocation; each positional arg is one member):

bash
$ dash0 -X teams add-members <team-id> <member-id> <email-address>
2 members added to team "<team-id>"

teams remove-members (experimental)

Remove one or more members from a team. Members can be specified by ID or email address. Prompts for confirmation unless --force is passed.

bash
dash0 -X teams remove-members <team-id> <member-id-or-email> [<member-id-or-email>...] [--force]

Remove a member by ID:

bash
$ dash0 -X teams remove-members <team-id> <member-id> --force
1 member removed from team "<team-id>"

Remove a member by email address:

bash
$ dash0 -X teams remove-members <team-id> <email-address> --force
1 member removed from team "<team-id>"

members list (experimental)

List all members of the organization, including their organization role. The role column is blank when the API does not provide a role.

bash
dash0 -X members list [-o <format>] [--skip-header] [--column <col>]
FlagDefaultDescription
-otableOutput format: table, json, or csv
--skip-headerfalseOmit the header row from table and csv output
--columnColumn to display (repeatable; table and csv only)

Example:

bash
$ dash0 -X members list
NAME         EMAIL              ROLE          ID                              URL
Alice Smith  alice@example.com  admin         m1-0000-0000-0000-000000000001  https://app.dash0.com/goto/settings/members?member_id=m1-0000-0000-0000-000000000001
Bob Jones    bob@example.com    basic_member  m2-0000-0000-0000-000000000002  https://app.dash0.com/goto/settings/members?member_id=m2-0000-0000-0000-000000000002
...

Column aliases: name / member name, email, role, id / member id, url.

Aliases: ls

members invite (experimental)

Invite one or more members to the organization by email address.

bash
dash0 -X members invite <email> [<email>...] [--role <role>]
FlagDefaultDescription
--rolebasic_memberRole to assign: basic_member or admin

Invite a single user:

bash
$ dash0 -X members invite user@example.com
Invitation sent to user@example.com

Invite multiple users in one call with an explicit role:

bash
$ dash0 -X members invite user1@example.com user2@example.com --role admin
Invitations sent to 2 email addresses

Aliases: add

members remove (experimental)

Remove one or more members from the organization. Members can be specified by ID or email address. Prompts for confirmation unless --force is passed.

bash
dash0 -X members remove <member-id-or-email> [<member-id-or-email>...] [--force]

Remove a member by ID:

bash
$ dash0 -X members remove <member-id> --force
Member "<member-id>" removed

Remove a member by email address (resolved to an ID server-side):

bash
$ dash0 -X members remove <email-address> --force
Member "<member-id>" removed

Aliases: delete

Raw HTTP command

api (experimental)

Call any Dash0 API endpoint directly, reusing the active profile's API URL, authentication token, and (by default) dataset. Useful for endpoints that do not yet have a dedicated subcommand. Requires the -X (or --experimental) flag.

bash
dash0 -X api [METHOD] <path> [flags]

The command is deliberately flag-driven — no positional grammar for headers, query parameters, or body fields. Request bodies always come from a file (or stdin) via -f. Headers are set with -H. Query parameters are baked into the path.

Path

Relative paths must start with /api/ and are resolved against the profile's api-url:

  • dash0 -X api /api/sampling-rules → <api-url>/api/sampling-rules

Absolute URLs (http:// or https://) are passed through verbatim. Query parameters are part of the path:

  • dash0 -X api "/api/agentic-workflows?folderPath=oncall"

Method

The method is a positional argument before the path. It is optional, case-insensitive, and defaults to GET.

  • dash0 -X api /api/foo uses GET.
  • dash0 -X api POST /api/foo -f body.json uses POST.
  • dash0 -X api delete /api/foo/<id> uses DELETE.

Combining GET with -f is a usage error — use an explicit body-bearing method (POST, PUT, PATCH) when sending a payload.

Flags

FlagShortDescription
--file-fRequest body from a file, or - for stdin. Mutually exclusive with GET.
--header-HRequest header as Key: Value (repeatable).
--verbose-vPrint request and response details to stderr (with the Authorization header redacted).
--datasetDataset to inject as a query parameter. Pass "" to skip injection.

Authentication

Authentication is managed by the active profile. Setting Authorization via -H is a hard error — remove the header and let the CLI handle it.

Dataset injection

The dataset is auto-injected as a dataset=<value> query parameter, resolved from the standard precedence chain (flag → environment variable → active profile). Pass --dataset "" to opt out for endpoints that do not accept a dataset, such as organization-level APIs.

If the path already contains a dataset= query parameter and --dataset resolves to a non-empty value, the command errors out — remove the value from the path or pass --dataset "".

Content-Type

The Content-Type header defaults to application/json when a body is present. Override it via -H 'Content-Type: <value>'.

Output and errors

The response body is streamed to stdout unchanged. Non-2xx responses return a non-zero exit code. The response body is still printed so the caller can inspect the error payload.

Use -v to see the full request line, outbound headers, request body, response status, and response headers on stderr.

Examples

GET — dataset auto-injected from the active profile:

bash
dash0 -X api /api/sampling-rules

GET against an organization-level endpoint that does not take a dataset:

bash
dash0 -X api /api/organization/settings --dataset ""

GET with query parameters baked into the path:

bash
dash0 -X api "/api/agentic-workflows?folderPath=oncall"

POST with a payload from a file:

bash
dash0 -X api POST /api/sampling-rules -f sampling-rule.json

POST with a payload from stdin and a custom header (the cat | dash0 … pipeline is a single command):

bash
cat sampling-rule.json \
  | dash0 -X api POST /api/sampling-rules -f - -H 'X-Request-Id: abc123'

DELETE with an explicit dataset override:

bash
dash0 -X api delete /api/sampling-rules/<id> --dataset production

Debug a failing request:

bash
dash0 -X api POST /api/sampling-rules -f sampling-rule.json -v

Agent tooling commands

Agent tooling commands distribute the dash0-cli Agent Skill — a SKILL.md plus reference docs following the open Agent Skills specification — so AI coding agents (Claude Code, Cursor, Codex, GitHub Copilot, and others) can discover this CLI's command surface without spending turns on --help exploration.

They differ from every other command category:

  • No --api-url, --auth-token, or --dataset — they never call the Dash0 API.
  • Not gated behind --experimental — the whole point is frictionless discovery, so requiring a flag agents don't yet know about would be circular.
  • No -o/--output flag, in either human or agent mode. A skill's content is markdown prose meant to be read directly; JSON-wrapping it would only force an agent to unescape it back into the prose it already reads natively, with no compensating structure gained. Errors from these commands still get the standard hint-carrying JSON treatment in agent mode (see Agent mode), since that's a mechanism independent of a command's own -o flag.

skill install

Detect which supported AI coding agent (Claude Code, Codex, Cursor, or GitHub Copilot) is driving the current session, and install the dash0-cli Agent Skill into that agent's conventional skills directory in the current project.

bash
dash0 skill install [--dir <path>]
FlagDefaultDescription
--dircurrent directoryDirectory to install into

Detection is environment-variable based (the same markers Agent mode auto-detects), and maps to one directory per host, relative to the target directory:

HostDirectory
Claude Code.claude/skills/dash0-cli
Codex.agents/skills/dash0-cli
Cursor.cursor/skills/dash0-cli
GitHub Copilot.github/skills/dash0-cli (the project-level convention; ~/.copilot/skills/ is for personal, home-directory-level skills)

install writes only to the one directory matching the detected host — it does not spray files into every known convention. Re-running it always overwrites, since the bundle is regenerable, CLI-managed content, not user data.

If no supported host can be detected, install fails rather than guessing, and points at the standards-based alternative:

bash
$ dash0 skill install
Error: could not detect a supported agent host in this environment (checked: Claude Code, Codex, Cursor, GitHub Copilot)
Hint: install the dash0-cli skill instead with `npx skills add dash0hq/dash0-cli` or `gh skill install dash0hq/dash0-cli`

Install the skill for the detected agent host:

bash
$ dash0 skill install
Installed dash0-cli skill (24 files) to .claude/skills/dash0-cli (detected: claude-code)

Install into a different directory than the current one:

bash
dash0 skill install --dir ./my-project

skill show

Print the dash0-cli Agent Skill bundle to stdout without writing any files — the disk-free path for CI or ephemeral agent sessions, or for environments where the agent host can't be auto-detected.

bash
dash0 skill show [topic]

With no argument, prints SKILL.md, the entry point, which includes an index of every available topic. With a topic argument, prints that topic's reference content raw. Topics match the actual top-level dash0 <command> name (dashboards, logs, teams, and so on), not an internal taxonomy category.

Print the entry-point SKILL.md, including the topic index:

bash
dash0 skill show

Print a specific topic's reference content:

bash
dash0 skill show dashboards

An unknown topic fails with an error listing the valid topic names, so an agent can self-correct in one more call:

bash
$ dash0 skill show bogus-topic
Error: unknown skill topic "bogus-topic"
Hint: valid topics are: agent0, apply, api, auth-tokens, aws-metric-scrape-configs, check-rules, config, dashboards, datasets, diff, evals, failed-checks, login, logs, members, metrics, notification-channels, otlp, recording-rules, signal-to-metrics-rules, slos, spam-filters, spans, synthetic-checks, teams, time-series-aggregations, traces, views

Common workflows for AI agents

Set up credentials from environment variables

When environment variables are already set, no profile is needed. Export the four connection variables once in your shell:

bash
export DASH0_API_URL=https://api.us-west-2.aws.dash0.com DASH0_OTLP_URL=https://ingress.us-west-2.aws.dash0.com DASH0_AUTH_TOKEN=auth_xxx DASH0_DATASET=default

Then any subsequent command picks them up without --api-url/--auth-token flags, for example:

bash
dash0 dashboards list
bash
dash0 logs query --from now-1h

Export an asset, modify it, and re-apply

Export the asset to YAML:

bash
dash0 dashboards get <id> -o yaml > dashboard.yaml

Edit the file, then update — the ID is read from the file content so no positional arg is needed:

bash
dash0 dashboards update -f dashboard.yaml

Alternatively, use apply, which auto-detects create vs update from the asset's ID:

bash
dash0 apply -f dashboard.yaml

Bulk export all assets of one type

The YAML output contains full asset definitions as a multi-document stream, ready to be re-applied.

Export all dashboards to a file:

bash
dash0 dashboards list -o yaml > all-dashboards.yaml

Re-apply them later (the same file can be replayed across environments):

bash
dash0 apply -f all-dashboards.yaml

Send a deployment event

bash
dash0 logs send "Deployment v2.3.0 completed" \
    --event-name dash0.deployment \
    --severity-number 9 \
    --resource-attribute service.name=my-service \
    --resource-attribute deployment.environment.name=production \
    --log-attribute deployment.status=succeeded

Query errors in the last hour

bash
dash0 logs query \
    --from now-1h \
    --filter "otel.log.severity.range is_one_of ERROR WARN" \
    --limit 200

Non-interactive deletion (for automation)

Always pass --force to skip the confirmation prompt:

bash
dash0 dashboards delete a1b2c3d4-... --force

With --force, an asset that is already gone is treated as success: the command exits 0 and prints an "already deleted" line to stderr. This is safe to invoke from GitOps or agent-driven pipelines even when another actor may have deleted the asset concurrently.

Validate assets before applying

Use --dry-run to check for errors without making changes:

bash
dash0 apply -f assets/ --dry-run

--dry-run is local-only, so it cannot tell a create from an update. dash0 diff (experimental) fetches each asset's current state from Dash0 first, so it can:

bash
dash0 --experimental diff -f assets/

See diff for the full reference, including its three-way exit code (0 clean, 1 differences pending, 2 error).

Sync a directory to match its state as of a git ref (experimental)

apply --since <ref> deletes assets removed from -f's contents since <ref>, in addition to the usual create/update behavior. Requires --experimental/-X and -f's target to be inside a git repository:

bash
dash0 --experimental apply -f assets/ --since HEAD~1 --force

Preview the plan (creates, updates, and deletions) first with dash0 --experimental diff -f assets/ --since HEAD~1; see apply --since for the full reference, including the GitHub Actions invocation pattern and the ref-resolution edge cases.