Skip to content
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

Enhance LogRecord Deserialization with Default Values for Missing Fields #1773

Merged
merged 4 commits into from
May 15, 2024

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented May 15, 2024

Changes

Creating separate PRs for the small issues I am finding while doing integration tests for logs.

As of now, deserialization of LogRecords fails if certain fields are missing in the JSON input. By introducing default values for these fields, we ensure the deserialization process handles missing fields gracefully, similar to the current behavior of the traces deserialization.

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@lalitb lalitb requested a review from a team May 15, 2024 17:29
Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.6%. Comparing base (5b238eb) to head (774637f).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1773     +/-   ##
=======================================
- Coverage   71.6%   71.6%   -0.1%     
=======================================
  Files        136     136             
  Lines      20857   20857             
=======================================
- Hits       14953   14951      -2     
- Misses      5904    5906      +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cijothomas cijothomas merged commit 349d804 into open-telemetry:main May 15, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants