Repository navigation
fix(env): pass through OpenTelemetry variables - #927
Open
jasonkuhrt wants to merge 2 commits into
Open
jasonkuhrt wants to merge 2 commits into
jasonkuhrt wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
OpenTelemetry SDKs read their exporter settings (
OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_SERVICE_NAMEand so on) straight from the process environment. A cached task's process gets only the variables its config lists, plusDEFAULT_UNTRACKED_ENV, andOTEL_*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 listsOTEL_*in itsuntrackedEnv. 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 addOTEL_*to every cached task'suntrackedEnvwhen each config loads.#691 added
ACTIONS_ID_TOKEN_REQUEST_URLto the defaults for the same reason: a tool inside cached tasks needs a variable that no task config lists.Changes
OTEL_*joinsDEFAULT_UNTRACKED_ENV, with a test beside #691's.EnvFingerprints::untracked_env_config). Any edit to the default list does the same.OTEL_*name inenvstill fingerprints it.