opentelemetry-python
opentelemetry-python copied to clipboard
Add a more informative error message when parsing ENV headers
Also, rename the function to make it clear that this parsing is specific to headers provided via ENV variables.
Description
I ran into this issue recently, and the error message was only somewhat helpful. I read up on some history here (#2248, #2103, #2010) and I think this error message should help point folks in the right direction. I think it's particularly useful here since this is a change from 1.5.0, so if folks are upgrading down the road, their ENV variables will stop working, and it'd be nice to help point them to what they need to change.
I also renamed the method and docstring because my understanding is that this method is specifically (in our context) to parse headers as they are encoded in ENV files, and will fail to parse non-encoded headers, so I wanted to make it clearer what it is doing so it doesn't seem like a general-purpose header parser.
Type of change
Please delete options that are not relevant.
- [x] Documentation fix (non-breaking change which fixes an issue)
How Has This Been Tested?
I ran the tox tests and everything passed. There should be no functional change in this commit.
Does This PR Require a Contrib Repo Change?
- [ ] Yes.
- [x] No.
Checklist:
- [ ] Followed the style guidelines of this project
- [ ] Changelogs have been updated
- [ N/A ] Unit tests have been added
- [ N/A ] Documentation has been updated
(I will double-check on these shortly)
- :x: - Joel Bradshaw The commit (53caddfc5b09a3e3511d98a039dd13476aeb2676) is not authorized under a signed CLA. Please click here to be authorized. For further assistance with EasyCLA, please submit a support request ticket.
Ugh, I think this is a good PR but I'm grumpy enough about CLAs without having to sign my mailing address to it.
In whatever capacity I can, I release this changeset under the WTFPL or a similar public-domain-equivalent license of your choice, pick one. Or just, like get inspired and make the same changes somewhere else.
Ugh, I think this is a good PR but I'm grumpy enough about CLAs without having to sign my mailing address to it.
In whatever capacity I can, I release this changeset under the WTFPL or a similar public-domain-equivalent license of your choice, pick one. Or just, like get inspired and make the same changes somewhere else.
Ok, so, just to be sure, are you ok with someone with a checked CLA to copy this code and paste it in a new PR and submit it?
Ugh, I think this is a good PR but I'm grumpy enough about CLAs without having to sign my mailing address to it. In whatever capacity I can, I release this changeset under the WTFPL or a similar public-domain-equivalent license of your choice, pick one. Or just, like get inspired and make the same changes somewhere else.
Ok, so, just to be sure, are you ok with someone with a checked CLA to copy this code and paste it in a new PR and submit it?
Go for it! You have my blessing, copy/paste away.
Thanks for the PR. I will close this one and mark it good-first-issue and let someone else take it up. If nobody shows interest I will create a follow-up PR with the same changes.