You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Tapir + Akka Http, OTEL Java agent sets the wrong transaction names. Only request method is included without url template.
Plain Akka Http routes provides correct transaction names.
I'm not that familiar with OTEL Java Agent, probably it has some Akka-specific instrumentation code. To work with Tapir, it would need to have Tapir-specific instrumentation code.
Alternatively, we could try to generate Akka directives (in the tapir -> akka interpreter) which can be instrumented using the Java Agent, but for that, we would need details on how this instrumentation works
Hi @adamw I work with @Matzz, and we have been looking at this issue together. So it looks like the java agent computes the URI as part of this code. From what I can tell, tapir uses a more general mechanism to match the route (in FilterServerEndpoints?). Perhaps there could be an opportunity to use PatchMatcher when computing the path within PekkoServerRequest?
Thinking a bit more about this, I don't think we'll be able to use Akka/Pekko's mechanisms for path matching. Tapir uses a different approach, with path decoders that are defined as part of the inputs, and while translating this to path matchers would be in theory possible, it would be a lot of work. Probably much easier to add OTel/Tapir integration - e.g. through an interceptor (not "magical", just a simple interceptor), which would report the appropriate data when an endpoint is successfully decoded.
Tapir version: "1.11.13"
OTEL Java agent version: "2.11.0"
Scala version: "2.13.16"
Describe the bug
When using Tapir + Akka Http, OTEL Java agent sets the wrong transaction names. Only request method is included without url template.
Plain Akka Http routes provides correct transaction names.
How to reproduce?
Here is a sample application which depicts this issue. All steps to reproduce are described in README
https://github.com/Matzz/tapir-test/blob/main/README.md
The text was updated successfully, but these errors were encountered: