apm-agent-java
apm-agent-java copied to clipboard
Support Kotlin Coroutines
Currently Elastic Apm Java Agent doesn't support tracing context inside Kotlin Coroutines. And when you use Elastic Apm in Kotlin project, tracing doesn't work inside coroutines. So it would be quite useful to have Elastic Apm suppurt for Kotlin Coroutines.
I think the best solution is to implement Elastic Apm Java Agent Plugin for supporting Kotlin Coroutines.
Alternatively we can pass tracing context manually to kotlin coroutine context. But that doesn't allow other plugins to work correctly and adds a lot of boilerplate code.
Any news on this?
Hi Kotliners. It's unlikely that Elastic will put resources into this any time soon. Ideally the Kotlin community would add this into the agent. Here's some options
- We've recently published a Plugin API with examples which maybe would assist adding this capability
- Or more effortful would be a PR adding a plugin directly in the agent in this repo
- Elastic APM accepts OpenTelemetry comms, so if there is an OpenTelemetry Kotlin agent that instruments coroutines, that might be an option