Conversation
|
Doh, looks like we can't be storing the span id as an int as we're testing against 32-bit versions of PHP as well and the span id is a 64-bit integer (8 bytes). |
| */ | ||
| class TraceContextFormatter implements FormatterInterface | ||
| { | ||
| const CONTEXT_HEADER_FORMAT = '/([0-9a-f]{2})-(.*)/'; |
There was a problem hiding this comment.
Is it possible that the hex values uses uppercase letters?
There was a problem hiding this comment.
It's not excluded in the spec, so I'll make sure it works for both.
There was a problem hiding this comment.
Thanks! LG, so merge once you've done this
| * @param TraceContext $context | ||
| * @return string | ||
| */ | ||
| public function serialize(TraceContext $context) |
There was a problem hiding this comment.
How do you add another serializer when the version 1 is released?
There was a problem hiding this comment.
Most likely, we will add an option in the constructor for which version to output.
| */ | ||
| class TraceContextFormatter implements FormatterInterface | ||
| { | ||
| const CONTEXT_HEADER_FORMAT = '/([0-9a-f]{2})-(.*)/'; |
There was a problem hiding this comment.
Thanks! LG, so merge once you've done this
Fixes #43
Had to switch the internal storage of the spanId and parentSpanId to be a hex string because some versions of PHP still run 32-bit (so an integer won't fit). This also affects the interface for the extension (which is still pre-alpha so no big deal).