blob: e64cfaa65bc08c058dda2a61a551a07a15315827 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package kamon.trace
import scala.util.DynamicVariable
object Tracer {
val traceContext = new DynamicVariable[Option[TraceContext]](None)
def context() = traceContext.value
def set(ctx: TraceContext) = traceContext.value = Some(ctx)
def start = set(newTraceContext)
def newTraceContext(): TraceContext = TraceContext()(Kamon.actorSystem)
}
|