https://kotlinlang.org logo
Title
m

Michael Pearce

04/02/2019, 4:58 AM
I see it's been asked before a few times with no answers, but I thought I'd check to see if anyone has managed to get transaction tracing with New Relic working with Ktor? Currently all transactions are being merged into a single
/NettyDispatcher
transaction, because the New Relic agent doesn't have built-in framework support for ktor.
c

cy

04/02/2019, 10:59 AM
Currently we only have very simple dropwizard metrics https://ktor.io/servers/features/metrics.html
m

mp

04/02/2019, 4:45 PM
Probably will need to implement an interceptor that sets whatever threadlocals NR uses via the coroutine context
I don’t know if NR exposes its threadlocal, though, so you may need to explicitly enter and exit a particular transaction
At some point I’ll probably need to do that to get ktor adopted at $job since we use NR
ping me if you beat me to it 🙂
c

cy

04/03/2019, 9:00 AM
We don't have plans to do it since our priorities are slightly different right now but PRs are always welcome 🙂