Ktor plugin does not capture kotlinx rpc (and perhaps even websocket) traces. #12939
Labels
contribution welcome
Request makes sense, maintainers probably won't have time, contribution would be welcome
enhancement
New feature or request
Describe the bug
When adding opentelemetry plugin to ktor server, only the http request are captured in the traces. KotlinX RPC (krpc) is added to Ktor via a plugin.
Unlike gRPC, kotlinx RPC does not use Http 2 and instead relies on websockets as is evident from the logs and it's plugin implementation which also leads me to believe that websocket traces are missing as well.
Steps to reproduce
In order to add OpenTelemetry plugin to Ktor server and client i've followed the offical ktor examples and implemented here
Expected behavior
The Ktor server has a bi-directional stream like
and a http GET request like
Actual behavior
Only the http requests are automatically captured on the server
In client if the initial RPC call fails I do get the trace for it but otherwise there are no traces related to rpc & websockets
Javaagent or library instrumentation version
opentelemetry-ktor-3.0 v2.10.0-alpha
Environment
JDK:
Temurin 21
OS:
MacOS Sequoia version 15.1
Additional context
No response
The text was updated successfully, but these errors were encountered: