-
Notifications
You must be signed in to change notification settings - Fork 646
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
Record logger name as the instrumentation scope name #4208
Record logger name as the instrumentation scope name #4208
Conversation
Cache one Logger object per Python logger name in LoggingHandler
|
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the explicit caching code
opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py
Outdated
Show resolved
Hide resolved
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
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: