log the attribute's key when encoding an attribute fails by danielhochman · Pull Request #3838 · open-telemetry/opentelemetry-python
Description
Include the attribute key that failed to encode. Very hard to track down otherwise.
Before
Invalid type <class 'NoneType'> of value None
After
Failed to encode key namespace: Invalid type <class 'NoneType'> of value None
Type of change
- New feature (non-breaking change which adds functionality)
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
- Unit tests
Does This PR Require a Contrib Repo Change?
- No.
Checklist:
- Followed the style guidelines of this project
- Changelogs have been updated
- Unit tests have been added
- Documentation has been updated