You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"%02X"causes the generated hex to be in capital letters.
According to the W3C specification the identifiers shall be in lowercase. "HEXDIGLC = DIGIT / "a" / "b" / "c" / "d" / "e" / "f" ; lowercase hex character"
Effect
This breaks when the request is received on the other end as Kamon fails to parse the identifier due to being uppercase
E.g.
val identityProvider = Identifier.Scheme.Double
val s = "2f2b727a4a0dcfd8c0bed5f6209f2694"
println(identityProvider.traceIdFactory.from(s.toLowerCase).isEmpty)
println(identityProvider.traceIdFactory.from(s.toLowerCase).string)
println(identityProvider.traceIdFactory.from(s.toUpperCase).isEmpty)
println(identityProvider.traceIdFactory.from(s.toUpperCase).string)
yields
false
2f2b727a4a0dcfd8c0bed5f6209f2694
true
Solution
Change to leftPad(identifier.bytes.map("%02x" format _).mkString)
Note the 'x' to dictate lower caps.
The text was updated successfully, but these errors were encountered:
Issue
When propagating using W3C it hex encodes the identifiers like this:
SpanPropagation.scala#L105
"%02X"
causes the generated hex to be in capital letters.According to the W3C specification the identifiers shall be in lowercase.
"HEXDIGLC = DIGIT / "a" / "b" / "c" / "d" / "e" / "f" ; lowercase hex character"
Effect
This breaks when the request is received on the other end as Kamon fails to parse the identifier due to being uppercase
E.g.
yields
Solution
Change to
leftPad(identifier.bytes.map("%02x" format _).mkString)
Note the 'x' to dictate lower caps.
The text was updated successfully, but these errors were encountered: