Repository navigation
fix: stop otel warning logs - #1956
Open
RafeArnold wants to merge 2 commits into
Open
RafeArnold wants to merge 2 commits into
RafeArnold wants to merge 2 commits into
Conversation
github-actions
Bot
requested review from
Kavindu-Dodan,
beeme1mr,
thiyagu06 and
toddbaert
October 28, 2026 12:59
RafeArnold
force-pushed
the
fix-otel-warnings
branch
from
October 28, 2026 13:03
f08c16c to
5038682
Compare
aepfli
approved these changes
Oct 28, 2026
aepfli
left a comment
Member
There was a problem hiding this comment.
thank you, looks like a good addition to me.
RafeArnold
force-pushed
the
fix-otel-warnings
branch
from
November 3, 2026 09:22
5038682 to
af5c24c
Compare
Author
|
thanks for the review @aepfli! is there anything i can do to move this forward? |
Member
|
hey @RafeArnold, nothing I can do, we need a second approval from @open-feature/sdk-java-maintainers - hopefully this ping helps |
as of otel api 1.67.0, AttributesBuilder.putAll logs a warning if passed null. both TracesHook.after and TracesHook.error call AttributesBuilder .putAll, so if TracesHookOptions.extraAttributes is left as its null default, or set to null explicitly, or the provided dimensionExtractor returns null it triggers this warning log. to avoid this, TracesHook uses Attributes.empty if passed an options instance with a null extraAttributes field, and checks if the extractor produced null before adding the result. Signed-off-by: rafearnold <rafe.arnold@gmail.com>
port the TracesHook fix from the previous commit to MetricsHook. Signed-off-by: rafearnold <rafe.arnold@gmail.com>
RafeArnold
force-pushed
the
fix-otel-warnings
branch
from
November 9, 2026 12:21
af5c24c to
69712a6
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
as of otel api 1.67.0, AttributesBuilder.putAll logs a warning if passed null. both TracesHook and MetricsHook call AttributesBuilder.putAll in their after and error methods, so if any of the Hooks' attribute options produced null, it would trigger this warning log. the PR prevents those logs by ensuring Attributes.putAll is never called with a null argument.
How to test
Relevant tests have been added to the existing junit suite.