-
Notifications
You must be signed in to change notification settings - Fork 651
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
Use BoundedAttributes
instead of raw dict to extract attributes from LogRecord
#3114
Comments
/assign |
@findmyway since I am new to this code base, I wanted to clarify something before I push out my PR. In your description, you are suggesting to use def _get_attributes(record: logging.LogRecord) -> BoundAttributes:
... |
Yes, and I'd also suggest using opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py Line 68 in b184dc9
|
@gdhuper are you still working on this? |
I would like to take this issue. |
Sorry about the inactivity on this. I ran into some build errors that I couldn't get around. Feel free to take the issue. |
…LogRecord #3114 (#3310) Co-authored-by: Diego Hurtado <[email protected]> Co-authored-by: OpenTelemetry Bot <[email protected]>
opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py
Lines 336 to 339 in b184dc9
In the latest main branch, attributes extracted from a
LogRecord
usedict
directly. Better to use theBoundedAttributes
from API to avoid some corner cases, like invalid value type or messages of long length.The text was updated successfully, but these errors were encountered: