diff options
Diffstat (limited to 'kamon-core/src/main')
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala | 10 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/util/HexCodec.scala | 16 |
2 files changed, 12 insertions, 14 deletions
diff --git a/kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala b/kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala index 7663edb3..eba5fd5f 100644 --- a/kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala +++ b/kamon-core/src/main/scala/kamon/trace/SpanContextCodec.scala @@ -42,11 +42,11 @@ object SpanContextCodec { ) val ZipkinB3: SpanContextCodec[TextMap] = new TextMapSpanCodec( - traceIDKey = "X─B3─TraceId", - parentIDKey = "X─B3─ParentSpanId", - spanIDKey = "X─B3─SpanId", - sampledKey = "X─B3─Sampled", - baggagePrefix = "X─B3─Baggage-", + traceIDKey = "X-B3-TraceId", + parentIDKey = "X-B3-ParentSpanId", + spanIDKey = "X-B3-SpanId", + sampledKey = "X-B3-Sampled", + baggagePrefix = "X-B3-Baggage-", baggageValueEncoder = urlEncode, baggageValueDecoder = urlDecode ) diff --git a/kamon-core/src/main/scala/kamon/util/HexCodec.scala b/kamon-core/src/main/scala/kamon/util/HexCodec.scala index d5a9593f..e8807e74 100644 --- a/kamon-core/src/main/scala/kamon/util/HexCodec.scala +++ b/kamon-core/src/main/scala/kamon/util/HexCodec.scala @@ -41,18 +41,16 @@ object HexCodec { var i = index var result = 0L val endIndex = Math.min(index + 16, lowerHex.length) - while ( { - index < endIndex - }) { - val c = lowerHex.charAt(index) + while (i < endIndex) { + val c = lowerHex.charAt(i) result <<= 4 - if (c >= '0' && c <= '9') result |= c - '0' - else if (c >= 'a' && c <= 'f') result |= c - 'a' + 10 + if (c >= '0' && c <= '9') + result |= c - '0' + else if (c >= 'a' && c <= 'f') + result |= c - 'a' + 10 else throw isntLowerHexLong(lowerHex) - { - i = i + 1; index - 1 - } + i += 1 } result } |