Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(resources): strict OTEL_RESOURCE_ATTRIBUTES decoding #3341

Merged
merged 2 commits into from
Oct 28, 2022

Conversation

legendecas
Copy link
Member

Which problem is this PR solving?

Fixes #3131

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Add new valid test cases
  • Add new invalid test cases

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@legendecas legendecas requested a review from a team October 18, 2022 04:01
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Merging #3341 (7986767) into main (e9347e4) will increase coverage by 0.84%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3341      +/-   ##
==========================================
+ Coverage   92.68%   93.53%   +0.84%     
==========================================
  Files         237      244       +7     
  Lines        6921     7394     +473     
  Branches     1443     1532      +89     
==========================================
+ Hits         6415     6916     +501     
+ Misses        506      478      -28     
Impacted Files Coverage Δ
...entelemetry-resources/src/detectors/EnvDetector.ts 94.11% <100.00%> (+5.88%) ⬆️
...emetry-instrumentation-xml-http-request/src/xhr.ts 97.58% <0.00%> (ø)
...ation-xml-http-request/src/enums/AttributeNames.ts 100.00% <0.00%> (ø)
...es/opentelemetry-context-zone-peer-dep/src/util.ts 100.00% <0.00%> (ø)
...-instrumentation-fetch/src/enums/AttributeNames.ts 100.00% <0.00%> (ø)
...mentation-xml-http-request/src/enums/EventNames.ts 100.00% <0.00%> (ø)
...s/opentelemetry-instrumentation-fetch/src/fetch.ts 97.02% <0.00%> (ø)
...ry-context-zone-peer-dep/src/ZoneContextManager.ts 85.18% <0.00%> (ø)
packages/opentelemetry-sdk-trace-web/src/utils.ts 95.00% <0.00%> (+29.37%) ⬆️

@anthony-telljohann
Copy link
Contributor

I didn't realize characters outside the baggage-octet range MUST be percent-encoded. Great fix.

@dyladan
Copy link
Member

dyladan commented Oct 18, 2022

I didn't realize characters outside the baggage-octet range MUST be percent-encoded. Great fix.

The baggage specification is actually going to remove that wording. The spec will simply state the character range which is allowed and suggest percent encoding as one possible way to stay within the allowed character range.

source: I am on the working group which made the decision

@dyladan dyladan added bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect pkg:resources labels Oct 18, 2022
@dyladan
Copy link
Member

dyladan commented Oct 28, 2022

lint failure caused by shields.io. rerunning but it isn't a blocker

@dyladan dyladan merged commit f31448e into open-telemetry:main Oct 28, 2022
@legendecas legendecas deleted the resource-decode branch October 28, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:resources priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decode values from OTEL_RESOURCE_ATTRIBUTES
4 participants