SDK env var config Enum values are case-insensitive#4576
Merged
carlosalberto merged 9 commits intoopen-telemetry:mainfrom Jul 21, 2025
Merged
SDK env var config Enum values are case-insensitive#4576carlosalberto merged 9 commits intoopen-telemetry:mainfrom
carlosalberto merged 9 commits intoopen-telemetry:mainfrom
Conversation
tsloughter
previously approved these changes
Jul 2, 2025
tsloughter
reviewed
Jul 2, 2025
Member
tsloughter
left a comment
There was a problem hiding this comment.
Oops, only way to undo an approval is to make a comment it seems.
Member
Author
Not really. I dismissed your approval. |
MrAlias
approved these changes
Jul 2, 2025
tsloughter
approved these changes
Jul 2, 2025
carlosalberto
approved these changes
Jul 2, 2025
Contributor
|
Let's advertise this PR in the next spec call so maintainers can double check it. |
reyang
approved these changes
Jul 2, 2025
Kielek
approved these changes
Jul 3, 2025
arminru
approved these changes
Jul 8, 2025
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Member
|
Note that this is an existing behavior for some enums already: |
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 13, 2025
August 2025 release. ### Logs - Improve concurrency safety description of `LogRecordProcessor.OnEmit`. ([#4578](#4578)) - Clarify that `SeverityNumber` values are used when comparing severities. ([#4552](#4552)) ### Entities - Mention entity references in the stability guarantees. ([#4593](#4593)) ### OpenTelemetry Protocol - Clarify protocol defaults on specification. ([#4585](#4585)) ### Compatibility - Flexibilie escaping of characters that are discouraged by Prometheus Conventions in Prometheus exporters. ([#4533](#4533)) - Flexibilize addition of unit/type related suffixes in Prometheus exporters. ([#4533](#4533)) - Define the configuration option "Translation Strategies" for Prometheus exporters. ([#4533](#4533)) - Define conversion of Prometheus native histograms to OpenTelemetry exponential histograms. ([#4561](#4561)) - Clarify what to do when scope attribute conflicts with name, version and schema URL. ([#4599](#4599)) ### SDK Configuration - Enum values provided via environment variables SHOULD be interpreted in a case-insensitive manner. ([#4576](#4576)) Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
Closed
3 tasks
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.
What
Enum values provided via environment variables SHOULD be interpreted in a case-insensitive manner.
When reporting configuration errors, implementations SHOULD display the original user-provided value to aid debugging.
Why
This improves user experience by allowing more flexible configuration (e.g.,
OTEL_EXPORTER_OTLP_PROTOCOL=grpcandOTEL_EXPORTER_OTLP_PROTOCOL=gRPCcan be treated equivalently).This improves consistency as it is also similar to the Boolean definition which has many in common to Enum type:
Implementations
Here is an example from OTel Go (existing code from
mainbranch) whereOTEL_TRACES_SAMPLERenum value is lower-cased before comparing with known-values:https://github.com/open-telemetry/opentelemetry-go/blob/118298edcfd5a38c7eb767bc290a528d380a79fd/sdk/trace/sampler_env.go#L49-L54