fix(collector) respect log level as configured in collector config#2243
Open
wpessers wants to merge 1 commit intoopen-telemetry:mainfrom
Open
fix(collector) respect log level as configured in collector config#2243wpessers wants to merge 1 commit intoopen-telemetry:mainfrom
wpessers wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
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.
When
service.telemetry.logs.levelis set to a non-default value (anything other than INFO) in the collector config, the extension core's minimum level is raised to match it. So the collector's internal logs respect the configured level, and the extension logs remain unaffected.Note that the collector config can only make logging more restrictive than the extension level, setting it to DEBUG when the extension is at INFO has no effect.
When the collector's level is found to be the default (INFO), the extension's core is just used as is, preserving the existing behavior where
OPENTELEMETRY_EXTENSION_LOG_LEVELcontrols everything. I have used this 'heuristic' of looking at the INFO level to avoid having to resolve the collector config an extra time just to check whether the key is explicitly set, which could have impact on cold start (especially when using e.g. S3 as a provider).My idea is to do a release of the collector layer with this temporary fix and add a warning to the release, and then remove the fallback entirely in a subsequent release, just to make sure that no users relying on
OPENTELEMETRY_EXTENSION_LOG_LEVELto control the collector's log level are caught off guard.This is part of the solution for #2101