I am messing around with KTor and Coroutines. Based on the code if found from Marshall Pierce I was able to get transactions traced and named in New Relic, but it was missing the link to the automatically detected Jetty transactions (agent feature).
I figured I could get that working and ended up with a hack, basically duplicating JettyKtorHandler from KTor and adding tokens+linking. I know, not nice. But I was really hoping to get this working. And I am sooooo close…
With this in place I am getting:
- Single transactions reported per request
- The correct naming of the transaction
- Full trace of all the operations performed
BUT: New Relic is getting “double” time per request reported. The “real” time with the trace of the operations performed plus a section (matching the size) that just says “AsyncProcessing”. I have tried with a bunch of combinations of @Trace(async=true/false, dispatch=true/false) but honestly getting a bit lost.
Anyone that has seen similar behaviour and/or can help me pinpoint what is going on here? Since I am getting “one” transaction I know the linking across Coroutines are working, I am just seeing double time…