Repository navigation
fix(otel): validate config before consuming provider builder - #740
Closed
zhongkechen wants to merge 4 commits into
Closed
zhongkechen wants to merge 4 commits into
zhongkechen wants to merge 4 commits into
Conversation
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
September 25, 2026 21:59 — with
GitHub Actions
Inactive
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
September 25, 2026 22:15 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
September 25, 2026 23:04 — with
GitHub Actions
Inactive
Contributor
Codex AI reviewNo actionable findings. Residual risk: tests were not executed under the review constraints; assessment is based on the SHA-anchored diff and base sources. Reviewed commit |
This branch was previously 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.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
Extracted as an independent fix from #721.
Description
The provider-builder constructors for both OTel plugins consumed the caller's builder, built a provider, and only then dereferenced the config. A null config therefore discarded an unreachable provider whose span processors and worker threads could not be shut down.
Validate the config before touching the builder in both plugins, and apply the same explicit validation to the config-only constructors. No public API changes.
Demo/Screenshots
Not applicable.
Checklist
Testing
Unit Tests
OtelPluginConfigValidationTest: 3 tests passed, covering all four constructor paths. Separate spies for both provider-builder constructors verify that null config rejection causes no builder interactions, including nobuild()call.Both spy tests fail against the original constructors without the early validation. Formatting checks passed.
Integration Tests
Not required; this is constructor validation before plugin execution begins.
Examples
Not applicable.