Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly parse unsigned integer trace id #1305

Merged
merged 7 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
import Long
  • Loading branch information
vmahajanhopper committed Oct 19, 2023
commit c9f360c1e1408b609f094ceaf703a31eec602504
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ import kamon.context.HttpPropagation.{HeaderReader, HeaderWriter}
import kamon.context.generated.binary.span.{Span => ColferSpan}
import kamon.context.{Context, _}
import kamon.trace.Trace.SamplingDecision
import java.lang.{Long => JLong}

import scala.util.Try

@@ -450,7 +451,7 @@ object W3CTraceContext {
* https://docs.datadoghq.com/tracing/guide/send_traces_to_agent_by_api/
*/
def decodeUnsignedLongToHex(id: String): String =
Long.parseUnsignedLong(urlDecode(id), 10).toHexString
JLong.parseUnsignedLong(urlDecode(id), 10).toHexString
}

class DataDog extends Propagation.EntryReader[HeaderReader] with Propagation.EntryWriter[HeaderWriter] {