Skip to content

fix: ensure valid json message attribute value#2428

Open
thompson-tomo wants to merge 2 commits into
open-telemetry:mainfrom
thompson-tomo:jruby_net-ldap
Open

fix: ensure valid json message attribute value#2428
thompson-tomo wants to merge 2 commits into
open-telemetry:mainfrom
thompson-tomo:jruby_net-ldap

Conversation

@thompson-tomo

Copy link
Copy Markdown
Contributor

This ensures that the message attribute is consistently encoded across jruby and ruby.

This is achieved by adding a value check for the message value which is automatically done on ruby but not jruby.

when Array
value.all? { |v| utf8_clean?(v) }
else
true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we set this to false, and drop anything which is not a String?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, in this scenario, yes it can probs be simplified as the additional scenarios were from when i was doing it in a different location.

@thompson-tomo thompson-tomo requested a review from scbjans July 3, 2026 17:01

@scbjans scbjans left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants