open-telemetry / opentelemetry-java-instrumentation

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

Instrumentation for Java NIO #1311

Open tylerbenson opened 4 years ago

tylerbenson commented 4 years ago

We instrument many frameworks at a higher level, but we don't directly handle NIO. This might help bridge some gaps in trace propagation.

See here for nice examples: https://www.baeldung.com/java-nio-selector

anuraaga commented 4 years ago

@tylerbenson I know with Netty it's possible to use tcnative to directly call epoll, bypassing NIO. Do you think this might limit the impact if we do instrument NIO?

trask commented 3 years ago

Based on recent SIG discussions, we are leaning towards avoiding instrumentation of low-level libraries (netty 👀) which have proven troublesome (e.g. request pipelining multiple requests over a single connection).

iNikem commented 3 years ago

Based on recent SIG discussions, we are leaning towards avoiding instrumentation of low-level libraries (netty 👀) which have proven troublesome (e.g. request pipelining multiple requests over a single connection).

I think we don't want to rely on lower lever instrumentations for proper context propagation and span creation. But lower level instrumentations can certainly enrich existing CLIENT spans with interesting details.