Skip to content

Apply percent decoding to resource attributes list - #4460

Merged
dbarker merged 9 commits into
open-telemetry:mainfrom
WyshalZyren:fix-resource-attributes-percent-decode
Aug 23, 2026
Merged

dbarker merged 9 commits into
open-telemetry:mainfrom
WyshalZyren:fix-resource-attributes-percent-decode

Conversation

@WyshalZyren

Copy link
Copy Markdown
Contributor

This updates resource.attributes_list handling to percent-decode values before storing them.

Changes include:

  • extracting PercentDecode into a reusable resource detail utility
  • using it in SdkBuilder::SetResource
  • keeping malformed percent sequences unchanged
  • adding direct decoder tests
  • adding resource.attributes_list parsing tests

Fixes #4456

@WyshalZyren
WyshalZyren requested a review from a team as a code owner August 20, 2026 06:01
@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: WyshalZyren / name: Wyshal Zyren (f62d624)

@codecov

codecov Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.66%. Comparing base (e30ef1d) to head (4b9dd6b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sdk/src/resource/detail/percent_decode.cc 94.45% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4460      +/-   ##
==========================================
+ Coverage   82.63%   82.66%   +0.04%     
==========================================
  Files         512      516       +4     
  Lines       20139    20197      +58     
==========================================
+ Hits        16640    16694      +54     
- Misses       3499     3503       +4     
Files with missing lines Coverage Δ
sdk/src/configuration/sdk_builder.cc 61.18% <100.00%> (+0.07%) ⬆️
sdk/src/resource/resource_detector.cc 100.00% <100.00%> (+2.39%) ⬆️
sdk/src/resource/detail/percent_decode.cc 94.45% <94.45%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbarker dbarker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR! Please see some minor feedback below. Once CI is passing I will approve.

Comment thread sdk/src/configuration/sdk_builder.cc Resolved
Comment thread sdk/src/configuration/sdk_builder.cc Resolved
Comment thread sdk/src/configuration/sdk_builder.cc Resolved
Comment thread sdk/src/configuration/sdk_builder.cc Resolved
Comment thread sdk/src/resource/resource_detector.cc Resolved
@WyshalZyren

Copy link
Copy Markdown
Contributor Author

@dbarker The remaining CMake clang 18 (maintainer mode, async) check failed with a segmentation fault in the OTLP TLS functional test (run_test_mode.sh, exit code 139), after the changed targets built successfully. Could you please rerun the failed job?

@dbarker dbarker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the fix!

@dbarker
dbarker merged commit 1c2b007 into open-telemetry:main Aug 23, 2026
77 checks passed
@WyshalZyren
WyshalZyren deleted the fix-resource-attributes-percent-decode branch August 27, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CONFIGURATION] Apply percent decode to resource.attributes_list

3 participants