open-telemetry / opentelemetry-python

OpenTelemetry Python API and SDK
https://opentelemetry.io
Apache License 2.0
1.67k stars 571 forks source link

log the attribute's key when encoding an attribute fails #3838

Closed danielhochman closed 1 week ago

danielhochman commented 3 months ago

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

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

Does This PR Require a Contrib Repo Change?

Checklist:

linux-foundation-easycla[bot] commented 3 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

xrmx commented 2 months ago

@danielhochman you have to sign the CLA for contributing to OpenTelemetry

lzchen commented 1 week ago

@danielhochman

Please fix the build and add a CHANGELOG entry