Skip to content

fix(env): pass through OpenTelemetry variables - #927

Open
jasonkuhrt wants to merge 2 commits into
voidzero-dev:mainfrom
jasonkuhrt:fix/otel-default-untracked
Open

jasonkuhrt wants to merge 2 commits into
voidzero-dev:mainfrom
jasonkuhrt:fix/otel-default-untracked

Conversation

@jasonkuhrt

Copy link
Copy Markdown
Contributor

Written by an AI agent (Claude) on behalf of @jasonkuhrt.

Motivation

OpenTelemetry SDKs read their exporter settings (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME and so on) straight from the process environment. A cached task's process gets only the variables its config lists, plus DEFAULT_UNTRACKED_ENV, and OTEL_* isn't among the defaults. So a tool that exports spans gets none of its settings inside a cached task, unless every cached task in the workspace lists OTEL_* in its untrackedEnv. An uncached task gets the whole environment, so the same tool exports or doesn't depending on whether its task is cached.

Our tools export spans when OTEL_* is set, and today we add OTEL_* to every cached task's untrackedEnv when each config loads.

#691 added ACTIONS_ID_TOKEN_REQUEST_URL to the defaults for the same reason: a tool inside cached tasks needs a variable that no task config lists.

Changes

OTEL_* joins DEFAULT_UNTRACKED_ENV, with a test beside #691's.

  • Like the other defaults, the variables reach every cached task, and their values never enter a cache key.
  • Every task's fingerprint changes once, because a task's untracked names are part of it (EnvFingerprints::untracked_env_config). Any edit to the default list does the same.
  • A task that lists an OTEL_* name in env still fingerprints it.

jasonkuhrt and others added 2 commits November 2, 2026 07:22
OpenTelemetry SDKs read their exporter settings from `OTEL_*` variables.
Cached tasks got none of them unless each task listed `OTEL_*` in its
`untrackedEnv`, while uncached tasks got the whole environment.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant