-
Notifications
You must be signed in to change notification settings - Fork 231
Do not encode span context in HTTP_HEADERS format #721
Do not encode span context in HTTP_HEADERS format #721
Conversation
Codecov Report
@@ Coverage Diff @@
## master #721 +/- ##
============================================
- Coverage 89.78% 88.85% -0.93%
- Complexity 590 595 +5
============================================
Files 70 72 +2
Lines 2164 2199 +35
Branches 284 287 +3
============================================
+ Hits 1943 1954 +11
- Misses 132 153 +21
- Partials 89 92 +3
Continue to review full report at Codecov.
|
} | ||
|
||
@Test | ||
public void testExtractSupportEncodedSpanContext() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this and next method names should be swapped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, fixed.
We know that string representation of a span context is safe to use in HTTP header. Thus, there is no need to encode it. JS & Go clients already avoid that unnecesserary encoding. This change is backward compatible because all clients unencode span context even if they do not encode it. More pragmatically, a client impacted by this change would already be incompatible with JS & Go clients. Signed-off-by: Clément MATHIEU <clement@unportant.info>
1c918e7
to
71b3e03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch!
Which problem is this PR solving?
String representation of a span context is safe to use in HTTP header. Thus, there is no need to encode it. JS & Go clients
already avoid that unnecessary encoding.
Resolves #720
Short description of the changes
This change is backward compatible because all clients unencode span context even if they do not encode it. More pragmatically, a client impacted by this change would already be incompatible with JS & Go clients.