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

Sanitize resource attribute pairs to avoid exception #2256

Conversation

NathanielRN
Copy link
Contributor

Description

Sanitze the OTEL_RESOURCE_ATTRIBUTES environment variable for "invalid" key/value pairs so that we do not throw a

ValueError: not enough values to unpack (expected 2, got 1)

exception.

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

  • Added a unit test to for the empty string "" as well as a pair that does not have the = symbol.

  • No.

Checklist:

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

@NathanielRN NathanielRN force-pushed the filter-invalid-resource-attributes-pairs branch from 8e7f447 to e9c9649 Compare November 1, 2021 17:10
@NathanielRN NathanielRN marked this pull request as ready for review November 1, 2021 17:10
@NathanielRN NathanielRN requested a review from a team November 1, 2021 17:10
@NathanielRN NathanielRN marked this pull request as draft November 1, 2021 17:14
@NathanielRN NathanielRN force-pushed the filter-invalid-resource-attributes-pairs branch from e9c9649 to e93d8f4 Compare November 1, 2021 17:45
@NathanielRN NathanielRN marked this pull request as ready for review November 1, 2021 18:00
@NathanielRN NathanielRN changed the title Filter invalid resource attribute pairs Sanitize resource attribute pairs to avoid exception Nov 1, 2021
@NathanielRN NathanielRN force-pushed the filter-invalid-resource-attributes-pairs branch from e93d8f4 to a18facb Compare November 4, 2021 19:18
@lzchen
Copy link
Contributor

lzchen commented Nov 5, 2021

@aabmass @lonewolf3739
Please resolve your conversations so we can merge this :)

@NathanielRN NathanielRN force-pushed the filter-invalid-resource-attributes-pairs branch from a18facb to 2fb6b61 Compare November 8, 2021 18:43
@NathanielRN NathanielRN force-pushed the filter-invalid-resource-attributes-pairs branch from 2fb6b61 to c1dfa09 Compare November 8, 2021 21:05
@owais owais enabled auto-merge (squash) November 8, 2021 23:29
@owais owais merged commit 9ed60ea into open-telemetry:main Nov 9, 2021
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.

5 participants