opentelemetry-python
opentelemetry-python copied to clipboard
Add configuration of log level and formatting for Auto Instrumentation
Description
Proposal for adding configuration of log level and formatting for Auto Instrumentation. Main subject to decide on is which env vars to use: OTEL_LOG_LEVEL: Exists in the SDK but unused. Speced out to be the level for the SDK's internal logger, not the LoggingHandler. OTEL_PYTHON_LOG_LEVEL: Currently only used by Python Logging Instrumentation OTEL_PYTHON_LOG_FORMAT: Currently only used by Python Logging Instrumentation OTEL_PYTHON_LOG_HANDLER_LEVEL: Possible new env var that is clearer and does not map to the same --log_level flag as OTEL_LOG_LEVEL
Fixes #4034
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
Does This PR Require a Contrib Repo Change?
- [ ] Yes. - Link to PR:
- [x] No.
Checklist:
- [x] Followed the style guidelines of this project
- [x] Changelogs have been updated
- [ ] Unit tests have been added
- [ ] Documentation has been updated