Record logger name as the instrumentation scope name#4208
Merged
lzchen merged 17 commits intoopen-telemetry:mainfrom Oct 15, 2024
Merged
Conversation
Cache one Logger object per Python logger name in LoggingHandler
|
|
7 tasks
emdneto
reviewed
Oct 2, 2024
sfc-gh-jopel
commented
Oct 3, 2024
opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py
Outdated
Show resolved
Hide resolved
aabmass
reviewed
Oct 3, 2024
opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py
Outdated
Show resolved
Hide resolved
sfc-gh-jopel
commented
Oct 7, 2024
aabmass
approved these changes
Oct 7, 2024
opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py
Outdated
Show resolved
Hide resolved
aabmass
approved these changes
Oct 8, 2024
Member
aabmass
left a comment
There was a problem hiding this comment.
LGTM with the explicit caching code
opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py
Outdated
Show resolved
Hide resolved
Member
|
@sfc-gh-jopel thanks! Can you resolve all the comment threads that have been addressed? We just need one more approval and can merge this. |
emdneto
reviewed
Oct 10, 2024
emdneto
approved these changes
Oct 14, 2024
8 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.
Description
(Copied from #3810)
Fixes issue #2485 Record logger name as the instrumentation scope name
Approach: Cache one Logger object per Python logger
(name, version, schema_url)in LoggingHandler.The Open Telemetry Spec specifies that the Logger Name SHOULD be recorded as the Instrumentation Scope name. Reference: open-telemetry/opentelemetry-specification#2359
This has already been implemented in Open Telemetry Java, but not in Open Telemetry Python.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Modified many of the tests in test_export.py to include an assert that tests that the logger name and instrumentation scope name are the same.
Added logging benchmarks and caching tests.
Does This PR Require a Contrib Repo Change?
Checklist: