open-telemetry / opentelemetry-java-instrumentation

OpenTelemetry auto-instrumentation and instrumentation libraries for Java
https://opentelemetry.io
Apache License 2.0
1.89k stars 825 forks source link

Support Akka/Pekko Cluster #10104

Open zackman0010 opened 9 months ago

zackman0010 commented 9 months ago

Is your feature request related to a problem? Please describe.

Akka (and its fork Pekko) has the concept of Cluster, or communication between multiple nodes of the same service. OTel is already capable of message propagation through Akka Actors, but the propagation is broken if the message passes to a different node through Akka Remoting, which is what Cluster uses under-the-hood.

Describe the solution you'd like

I'd like to see auto-instrumentation support Akka Remoting.

Describe alternatives you've considered

No response

Additional context

Akka Remoting got a big overhaul starting in Akka 2.6, so 2.5 and lower would either need a separate instrumentation or not be instrumented. As Pekko was forked off 2.6, the Akka 2.6 instrumentation can be copied for Pekko, just renaming the classes.

Also, Kamon's auto-instrumentation agent already supports Akka Remoting, both 2.5 and 2.6. Their code is also open source under the Apache license, so it might be a good starting point to see how they instrumented Remoting to use it as an inspiration for how to instrument it in OTel.

laurit commented 8 months ago

We'd welcome a contribution for this