Skip to content
telemetry.dev
Esc
↑↓navigate↵open⌘Jpreview
On this page

Environments

Label telemetry by deployment, then filter by it, limit API keys to it, and set capture for it.

An environment names the deployment that sent telemetry, such as production, staging, or development. Use environments to keep one project’s deployments apart: you can filter and group by environment, limit an API key to one environment, and turn off prompt and response capture for one environment.

Set the environment

telemetry.dev reads the environment from the OpenTelemetry resource attribute deployment.environment.name:

export OTEL_RESOURCE_ATTRIBUTES="deployment.environment.name=staging"

The telemetry.dev SDKs set this attribute from the environment option or the TELEMETRY_DEV_ENVIRONMENT variable. They use production when you set neither. Read Configure init() in TypeScript or Configure init() in Python.

If deployment.environment.name is absent, telemetry.dev reads the older deployment.environment attribute. If both are absent, the telemetry gets the environment of its API key when the key is limited to one environment, and the environment default otherwise. This lets senders that cannot set resource attributes, such as the Claude API, still report an environment.

Set the same environment name on every service in a deployment. The dashboard shows names as sent, so Production and production appear as two filter values. API key limits and capture settings treat them as one environment.

Use environments in the dashboard

Where What you can do
Traces Filter traces and spans by environment. The filter lists up to 100 environment names. The Environment column is hidden by default; turn it on in Columns.
Trace detail Read the trace’s environment in the header fields.
Logs Read a log’s environment in the log details.
Overview Select By Environment to break traces down by environment.
API keys Limit a key to one environment.
Settings → Privacy Turn prompt and response capture on or off for each environment.

Limit an API key to one environment

Enter an Environment when you create a key. The key then accepts only telemetry with that environment and rejects other requests with 403 environment_mismatch. Read Limit a key to one environment.

Turn off capture for an environment

Open Settings, then the Privacy tab. Clear Store prompts and responses in the row for the environment, and select Save privacy settings.

Capture is on for an environment that has no saved row. The production and development rows are always present; select Add environment for other names. To cover telemetry that has no environment attribute and uses a key without an environment, add a row named default.

Read Turn off prompt and response capture for an environment for what this setting removes and what it keeps.

Last updated on October 18, 2026

Was this page helpful?