Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add log_level configuration #121

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

codeboten
Copy link
Contributor

This is to support the env variable OTEL_LOG_LEVEL.

Fixes #120

This is to support the env variable OTEL_LOG_LEVEL.

Fixes open-telemetry#120

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
@codeboten codeboten requested a review from a team September 16, 2024 17:12
@marcalff
Copy link
Member

Related:

Until the spec defines an enum for log levels, opentelemetry-configuration can only represent a log level as a string, to be interpreted (differently) by each SDK implementation.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This is the best we can do now, because the spec does not define an enum for log levels.

@@ -15,6 +15,11 @@ file_format: "0.1"
# Environment variable: OTEL_SDK_DISABLED
disabled: false

# Configure the log level used by the SDK logger
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the SDK logger? I think you mean to say the internal logger used internally by the SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know but I think that definition is lame. Can / should we do better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, PTAL

@@ -11,6 +11,9 @@
"disabled": {
"type": ["boolean", "null"]
},
"log_level": {
"type": ["string", "null"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, though without a resolution on open-telemetry/opentelemetry-specification#2039, we may be jumping ahead of the spec

examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
@codeboten codeboten requested a review from a team as a code owner September 19, 2024 16:41
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.

Add log level property to schema
4 participants