aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/core/reporting/SpanContext.scala
blob: 04a822d32e3d6decc244aa19bd50d0a1a449a518 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
package xyz.driver.core
package reporting

import scala.util.Random

case class SpanContext private[core] (traceId: String, spanId: String)

object SpanContext {
  def fresh(): SpanContext = SpanContext(
    f"${Random.nextLong()}%016x${Random.nextLong()}%016x",
    f"${Random.nextLong()}%016x"
  )
}