{
"present": true,
"modules": {
"annotation": {
"name": "Annotation Instrumentation",
"description": "Provides a set of annotations to create Spans and Metrics out of annotated methods",
"enabled": true,
"active": false
},
"akka-http": {
"name": "Akka HTTP Instrumentation",
"description": "Provides context propagation, distributed tracing and HTTP client and server metrics for Akka HTTP",
"enabled": true,
"active": true
},
"executor-service": {
"name": "Executor Service Instrumentation",
"description": "Provides automatic Context propagation to all non-JDK Runnable and Callable implementations which enables\n Context propagation on serveral situations, including Scala, Twitter and Scalaz Futures",
"enabled": true,
"active": true
},
"play-framework": {
"name": "Play Framework Instrumentation",
"description": "Provides context propagation, distributed tracing and HTTP client and server metrics for Play Framework",
"enabled": true,
"active": true
},
"mongo-driver": {
"name": "Mongo Driver Instrumentation",
"description": "Provides automatic tracing of client operations on the official Mongo driver",
"enabled": true,
"active": false
},
"akka-remote": {
"name": "Akka Remote Instrumentation",
"description": "Provides distributed Context propagation and Cluster Metrics for Akka",
"enabled": true,
"active": true
},
"jdbc": {
"name": "JDBC Instrumentation",
"description": "Provides instrumentation for JDBC statements, Slick AsyncExecutor and the Hikari connection pool",
"enabled": true,
"active": false
},
"scala-future": {
"name": "Scala Future Intrumentation",
"description": "Provides automatic context propagation to the thread executing a Scala Future's body and callbacks",
"enabled": true,
"active": true
},
"akka": {
"name": "Akka Instrumentation",
"description": "Provides metrics and message tracing for Akka Actor Systems, Actors, Routers and Dispatchers",
"enabled": true,
"active": true
},
"logback": {
"name": "Logback Instrumentation",
"description": "Provides context propagation to the MDC and on AsyncAppenders",
"enabled": true,
"active": true
}
},
"errors": {}
}
Another weird thing, I have enabled trace id in the logs. I'm able to see logs like this:
[info][2020-06-11_13:34:56.636] [8cb3f9b6f92ceebe|5e401da57b753cea] c.ClassName - Log Msg
Where the format is [%traceID|%spanID]
.
But when I open the URL http://jaeger-host:16686/trace/8cb3f9b6f92ceebe
it shows 404
Thanks @ivantopo I'm able to verify trace propagation in logs across async boundaries. Not seeing the small individual traces(ones for outound http calls or db calls) in jaeger now (as they are now part of another parent -- the WebSocket one). Not seeing the WebSocket trace in jaeger, but that's because of sampling.
This is what I did in a nutshell (so as to help others):
I think it's fine in 1:1 request-response cases, but when 1 request has multiple replies -- like a stream -- then you need to resort to context propagation.
Nevertheless, For me, for now, it's fine even without that. I'm creating new spans for new requests from UI, from a parent span. The child spans might close too fast -- giving incorrect information, but the parent span is there for the whole life of the socket.
implicit class KamonScheduler(scheduler: akka.actor.Scheduler) {
final def scheduleOnceWithKamon(delay: FiniteDuration, receiver: ActorRef, message: Any)(
implicit
executor: ExecutionContext,
sender: ActorRef = Actor.noSender
): Cancellable = {
val ctx = Kamon.currentContext()
scheduler.scheduleOnce(delay, new Runnable {
override def run = Kamon.runWithContext(ctx) { receiver ! message }
})
}
}