opentelemetry-python
opentelemetry-python copied to clipboard
Logs SDK: Logging Handler bridge populates unstable `code` attributes
https://github.com/open-telemetry/opentelemetry-python/blob/59d67549765d52bbcdba5d3d5f4563c993aee824/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/init.py#L482-L484
There is no formal conventions defining if logs SDK/bridges should populate code attributes. Also, those attributes are not stable (yet).
The recommendation is to
- remove or put them behind experimental feature-flag
- stop using deprecated
SpanAttributesand use https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/code_attributes.py to make the status obvious via the import path
Part of https://github.com/open-telemetry/community/issues/1751
Code attributes have become stable and we'll switch to the stable version for the next release. Also we removed usage of SpanAttributes. @lmolkova is it fine to close for you?
Thanks @xrmx ! It's awesome, the only concern I have is that they should be opt-in. I.e. I think there are no logs conventions that mention them as recommended/required. Added a comment on a related https://github.com/open-telemetry/semantic-conventions/issues/1981