Skip to content

Update LogRecord.to_json to handle bytes field in the body#4614

Merged
xrmx merged 6 commits intoopen-telemetry:mainfrom
DylanRussell:fix_console_exporter
Jun 13, 2025
Merged

Update LogRecord.to_json to handle bytes field in the body#4614
xrmx merged 6 commits intoopen-telemetry:mainfrom
DylanRussell:fix_console_exporter

Conversation

@DylanRussell
Copy link
Contributor

Description

Update LogRecord.to_json to handle bytes field in the body -- it is valid/possible for this to occur given the OTLP LogRecord format.

Fixes #4606

Type of change

Please delete options that are not relevant.

  • [ x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Unit tests

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • [ x] No.

Checklist:

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

@xrmx xrmx moved this to Easy to review / merge / close in Python PR digest Jun 11, 2025
@xrmx xrmx merged commit 9fffba4 into open-telemetry:main Jun 13, 2025
353 checks passed
@github-project-automation github-project-automation bot moved this from Easy to review / merge / close to Done in Python PR digest Jun 13, 2025
JWinermaSplunk pushed a commit to JWinermaSplunk/opentelemetry-python that referenced this pull request Feb 17, 2026
…metry#4614)

* fix console log exporter

* Fix console exporter

* Add changelog

* Remove BytesEncoder import
JWinermaSplunk pushed a commit to JWinermaSplunk/opentelemetry-python that referenced this pull request Feb 17, 2026
…metry#4614)

* fix console log exporter

* Fix console exporter

* Add changelog

* Remove BytesEncoder import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ConsoleLogExporter with bytes in body fails

3 participants