Repository navigation
[OpenTelemetry] Fix-up redaction behaviour - #8104
Open
martincostello wants to merge 3 commits into
Open
martincostello wants to merge 3 commits into
martincostello wants to merge 3 commits into
Conversation
3 of 8 tasks
Pull request dashboard statusWaiting on reviewers · refreshed 2026-11-10 12:52 UTC Review the latest changes. Status above doesn't look right?
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The self-diagnostics output change for OTEL_RESOURCE_ATTRIBUTES lacks the required Unreleased changelog entry with a PR link.
1 open issue
What changed in this PR
This follow-up to #8102 fixes dangling separators in the SDK's self-diagnostics display of OTEL_RESOURCE_ATTRIBUTES, while preserving redaction of malformed non-empty entries.
Changes:
- Skip empty attribute pairs and emit commas only between retained entries.
- Expand regression tests to cover leading, trailing, repeated, and empty-only separators.
| File | Description |
|---|---|
test/OpenTelemetry.Tests/Diagnostics/SelfDiagnosticsEnvironmentVariablePolicyTests.cs |
Adds parameterized coverage for malformed and empty attribute pairs. |
src/OpenTelemetry/Internal/Diagnostics/SelfDiagnosticsEnvironmentVariablePolicy.cs |
Moves empty-pair handling into the parsing loop to prevent dangling commas. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8104 +/- ##
==========================================
- Coverage 93.04% 93.03% -0.02%
==========================================
Files 399 399
Lines 23476 23475 -1
Branches 4389 4389
==========================================
- Hits 21843 21839 -4
- Misses 1113 1115 +2
- Partials 520 521 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
martincostello
marked this pull request as ready for review
November 10, 2026 12:32
martincostello
enabled auto-merge
November 10, 2026 12:32
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.

Fixes #8102 (comment).
Changes
Avoid emitting dangling separators.
Merge requirement checklist
CHANGELOG.mdfile(s) updated for non-trivial changesFootnotes
Yes, I can answer maintainer questions about the content of this PR without using AI. ↩