Skip to content

Update .log_level to be enum#447

Merged
codeboten merged 2 commits intoopen-telemetry:mainfrom
jack-berg:log-level-enum
Dec 4, 2025
Merged

Update .log_level to be enum#447
codeboten merged 2 commits intoopen-telemetry:mainfrom
jack-berg:log-level-enum

Conversation

@jack-berg
Copy link
Copy Markdown
Member

Resolves #387.

The spec OTEL_LOG_LEVEL env var describes itself as an enum, but never states the set of enum values.

This is a mistake we shouldn't repeat in declarative config. The lack of stricter semantics for the env var was probably from the desire to avoid bikeshedding about what those enum values should actually be. But we've come a long way from those early days, and have a stable log data model and proto which include severity number definition:

This is the obvious choice to use for .log_level.

Failing to do this would perpetuate language inconsistency around OTEL_LOG_LEVEL to the next generation of configuration, which would be a shame.

@jack-berg jack-berg requested a review from a team as a code owner December 2, 2025 22:21
@codeboten
Copy link
Copy Markdown
Contributor

Is the choice to use this over #445?

@jack-berg
Copy link
Copy Markdown
Member Author

Is the choice to use this over #445?

This is independent of #445. This is about changing .log_level to be an enum. #445 is about consistency about enum casing. If we merge #445, there will be merge conflicts with this.

@codeboten codeboten merged commit 67055d7 into open-telemetry:main Dec 4, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider making log_level experimental

3 participants