Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add fallback handling for encode log body #4601

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

Closed
wants to merge 2 commits into from

Conversation

ouyuran
Copy link

@ouyuran ouyuran commented May 26, 2025

Description

Add a fallback handling for log body encoding, if it cannot be handled by _encode_value then it will be converted to string by calling str first.

Fixes #4100

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit test

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@ouyuran ouyuran requested a review from a team as a code owner May 26, 2025 15:53
@xrmx
Copy link
Contributor

xrmx commented May 27, 2025

@ouyuran I think current code already handles this at a layer before the exporter.

@ouyuran
Copy link
Author

ouyuran commented May 27, 2025

@xrmx thanks for the info, I just checked release notes, it has been fixed at 1.32.0 which is one minor version ahead of us. I'll test on the new version.

@xrmx
Copy link
Contributor

xrmx commented Jun 3, 2025

@ouyuran had a chance to test a newer sdk?

@ouyuran
Copy link
Author

ouyuran commented Jun 3, 2025

@xrmx sorry for late, yes, I've tested on 1.33.1. It works as expected. I'll close this one.

@ouyuran ouyuran closed this Jun 3, 2025
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.

Logging Instrumentation gives Exception: Invalid type when an exception is passed directly to logging handler
2 participants