Skip to content

fix: Change otel env var#26390

Merged
Eric-Warehime merged 2 commits intomainfrom
eric/fix-otel-env
May 6, 2026
Merged

fix: Change otel env var#26390
Eric-Warehime merged 2 commits intomainfrom
eric/fix-otel-env

Conversation

@Eric-Warehime
Copy link
Copy Markdown
Contributor

Description

Fixes otel env var initialization via otelconf.

In this patch they changed the production env var and deprecated the old one--it returns an error now.

Closes: #XXXX

@github-actions

This comment has been minimized.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Greptile Summary

This PR updates the OpenTelemetry configuration environment variable name from OTEL_EXPERIMENTAL_CONFIG_FILE to OTEL_CONFIG_FILE in response to an upstream breaking change in the opentelemetry-go-contrib library, which deprecated the old variable and now returns an error for it.

  • telemetry/config.go: Updates the otelConfigEnvVar constant and the GoDoc comment to use OTEL_CONFIG_FILE.
  • telemetry/README.md: Updates two references in the documentation to use the new env var name.

Confidence Score: 5/5

Safe to merge — the change is a straightforward one-line constant rename that aligns the codebase with a breaking upstream change in the otelconf library.

Both code and documentation are updated consistently, no stale references to the old env var remain anywhere in the repo, and the fix directly unblocks users who would otherwise hit an error from the deprecated variable.

No files require special attention.

Important Files Changed

Filename Overview
telemetry/config.go Renames otelConfigEnvVar constant from OTEL_EXPERIMENTAL_CONFIG_FILE to OTEL_CONFIG_FILE and updates the inline comment; change is minimal and correct.
telemetry/README.md Updates two documentation references to the env var name to match the new OTEL_CONFIG_FILE value; no issues found.

Sequence Diagram

sequenceDiagram
    participant User
    participant OS as OS Environment
    participant init as telemetry init()
    participant SDK as otelconf.SDK

    User->>OS: export OTEL_CONFIG_FILE=path/to/config.yaml
    Note over OS: (previously OTEL_EXPERIMENTAL_CONFIG_FILE)
    init->>OS: os.Getenv("OTEL_CONFIG_FILE")
    OS-->>init: filePath (non-empty)
    init->>init: InitializeOpenTelemetry(filePath)
    init->>SDK: otelconf.NewSDK(opts...)
    SDK-->>init: otelSDK
    init->>init: Set global TracerProvider / MeterProvider / LoggerProvider
Loading

Reviews (1): Last reviewed commit: "Change otel env var" | Re-trigger Greptile

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.87%. Comparing base (e77c24c) to head (a111639).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #26390      +/-   ##
==========================================
- Coverage   64.88%   64.87%   -0.02%     
==========================================
  Files         890      874      -16     
  Lines       58583    57601     -982     
==========================================
- Hits        38011    37367     -644     
+ Misses      20572    20234     -338     
Files with missing lines Coverage Δ
telemetry/config.go 2.38% <ø> (ø)

... and 23 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Eric-Warehime Eric-Warehime enabled auto-merge May 6, 2026 17:21
@Eric-Warehime Eric-Warehime added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 5dac77d May 6, 2026
43 checks passed
@Eric-Warehime Eric-Warehime deleted the eric/fix-otel-env branch May 6, 2026 17:42
warpbuild-benchmark-bot Bot added a commit to WarpBuilds/cosmos-sdk that referenced this pull request May 6, 2026
@Eric-Warehime Eric-Warehime added the backport/v0.54.x Backport PR's to release/v0.54.x branch label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/v0.54.x Backport PR's to release/v0.54.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants