Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new akka-http-2.13_10.1.8 instrumentation module #271

Merged
merged 11 commits into from
May 3, 2021

Conversation

jasonjkeller
Copy link
Contributor

@jasonjkeller jasonjkeller commented Apr 8, 2021

Resolves #260

The akka-http-2.4.5 instrumentation wasn't applying on Scala 2.13. This PR adds a news akka-http-2.13_10.1.8 instrumentation module to support Scala 2.13. It also renames the old module and cleans up the verifier configuration which was trying to verify against versions that don't exist.

I tested with the akka http quickstart app and confirmed that the new module applies with Scala 2.13.

The customer who reported the issue was given a custom jar with the new module and confirmed that they once again see the transactions that disappeared after they upgraded to Scala 2.13.

Instrumentation modules loaded/skipped

Supportability/WeaveInstrumentation/Loaded/com.newrelic.instrumentation.akka-http-2.13_10.1.8/1
Supportability/WeaveInstrumentation/Skipped/com.newrelic.instrumentation.akka-http-2.11_2.4.5/1

Classes being weaved by new module:

Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/directives/OnSuccessMagnet$
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/Directive$
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatcher$$anon$2
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatcher$$anon$1
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatcher$$anon$4
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatcher$$anon$3
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/Directives$
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/Route$
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatchers
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/RequestContextImpl
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatchers$$anon$14
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatcher
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatchers$PathEnd$
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatchers$$anon$15
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/ImplicitPathMatcherConstruction$$anon$13
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/ImplicitPathMatcherConstruction$$anon$12
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/ImplicitPathMatcherConstruction
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/marshalling/ToResponseMarshallable$$anon$1
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatchers$Segment$
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/com/agent/instrumentation/akka/http/PathMatcherScalaUtils$$anon$1
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatcher$
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/com/agent/instrumentation/akka/http/PathMatcherScalaUtils$$anon$2
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatcher$Matched
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatcher$$anon$5
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/marshalling/Marshal
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/server/PathMatchers$Slash$
Supportability/WeaveInstrumentation/WeaveClass/com.newrelic.instrumentation.akka-http-2.13_10.1.8/akka/http/scaladsl/marshalling/ToResponseMarshallable

compile("com.typesafe.akka:akka-stream_2.11:2.5.19")
}
passesOnly('com.typesafe.akka:akka-http_2.12:[2.4.5,)') {
Copy link
Contributor Author

@jasonjkeller jasonjkeller Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the Scala 2.10 verifier checks from the old instrumentation module because there are no 2.10 compiled versions >= 2.4.5 on akka-http-experimental or akka-http thus they were never being verified against.

I also updated the start range for Scala 2.11 and 2.12 because 10.0.0 is the earliest version available, not 2.4.5.

@@ -4,7 +4,7 @@ sourceSets.test.scala.srcDir "src/test/java"
sourceSets.test.java.srcDirs = []

jar {
manifest { attributes 'Implementation-Title': 'com.newrelic.instrumentation.akka-http-2.4.5' }
manifest { attributes 'Implementation-Title': 'com.newrelic.instrumentation.akka-http-2.11_2.4.5' }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the module to make the Scala version clear.

@jasonjkeller
Copy link
Contributor Author

AITs pass except for the AkkaTest because of the renamed module. This PR on the AITs has been tested locally and fixes that failure.

Copy link
Contributor

@XiXiaPdx XiXiaPdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonjkeller I believe you mentioned most of these files are the same as the previous instrumentation module and the big change was the scala version this module compiles against? Are there any instrumentation changes I should pay particular attention to?

I'm trying to focus my review on what you see as a significant change from the previous module.

@jasonjkeller
Copy link
Contributor Author

@jasonjkeller I believe you mentioned most of these files are the same as the previous instrumentation module and the big change was the scala version this module compiles against? Are there any instrumentation changes I should pay particular attention to?

I'm trying to focus my review on what you see as a significant change from the previous module.

@XiXiaPdx The new module is virtually identical to the previous with the exception of a few minor Scala API changes that don't change how the instrumentation works at all.

Copy link
Contributor

@XiXiaPdx XiXiaPdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@jasonjkeller jasonjkeller merged commit 3f9d53d into main May 3, 2021
@jasonjkeller jasonjkeller deleted the akka-http-2.13_2.4.5 branch May 3, 2021 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

akka-http-2.4.5 instrumentation doesn't apply when using Scala 2.13.x
3 participants