newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
192 stars 140 forks source link

Akka HTTP enhancement #1839

Open kanderson250 opened 1 month ago

kanderson250 commented 1 month ago

While working on the new Pekko instrumentation, we noticed that with Pekko Http 1 (fork of Akka Http 10.2), it's possible for server routes to skirt our instrumentation.

As of Akka Http 10.2, the seal method in http.scaladsl.server.Route no longer applies to routes in all cases. An alternate method (toFunction) is sometimes called. Since our instrumentation uses seal as the entrypoint to wrap incoming requests and start transactions, routes that go through toFunction fail to report transactions.

This issue was demonstrated with Pekko Http 1.

Description

Verify that for apps using Akka Http 10.2, the existing instrumentation doesn't work.

Then add instrumentation as we have for Pekko Http 1 which captures routes in all cases (likely by instrumenting createAsyncHandler). Add a new AIT for Akka Http 10.2.

workato-integration[bot] commented 1 month ago

https://new-relic.atlassian.net/browse/NR-255577