[Java] New Relic Java Agent 6.0.0 / Scala 2.13.3 / Akka HTTP 10.1.12

I am using NewRelic Java Agent 6.0.0 / scala 2.13.3 / Akka HTTP 10.1.12 and I am not getting any web transactions - is this a tested environment? I tried using @Trace but as these are async calls using partial functions I was not able to get this to work. If this is not supported any examples that show how to do this manually would help?
Thanks in advance.

Hi there @julianpayne -

Looks like you are using 2.13 and our support only runs to Scala 2.12 right now. I can’t guarantee it, but you may be able to get this to work by using custom instrumentation. We have an example of how this works in our documentation, and that may be helpful for you:

https://docs.newrelic.com/docs/agents/java-agent/api-guides/java-agent-api-custom-instrumentation-annotation-example-app

Let me know how it goes!

Hi @hross,

Thaks for replying and the example but it does not help me with my scala code. Is it possible to send me an example of how you instrument the Scala 2.12 Akka HTTP calls as scala futures and partial functions mean that it is quite tricky to get the custom annotations to work?

Thanks for your help,

Julian

HI @hross,

Also is there a way to start a transaction using NewRelic API calls rather than the Java annotation? The reason that I ask is that the annotation can not be used to annotate a Scala function parameter?

Thanks,

Julian

Hey there @julianpayne - Custom instrumentation is technically not supported by our team, and I don’t see any examples that fit your specific need here in the community. That said, I know that @David.Fraga just managed to custom instrument the Java agent and I am hopeful he won’t mind being called in to see if he has any expertise he can share.

@David.Fraga if you have anything to share that would be great? So far this is what I am observing:

  1. If I use @Trace(async = true, metricName = "API") then I am not able to get any transactions to appear - I create a token and expire the token at the end of the API call.
  2. If I use @Trace(dispatcher = true, metricName = "API") then I can get a non-web transaction even though I call NewRelic.getAgent.getTransaction.[setWebRequest|convertToWebTransaction|setWebResponse] and the timing is incorrect.

Continuing lack of support for scala 2.13 is unacceptable - this is causing our company many issues currently as we have a number of service we need to upgrade / that have been upgraded and are now reporting rubbish. Scala 2.13 is around 18m old at this point so this is serious - particularly irksome is treating this as a “feature request” Feature Idea: Scala 2.13 support

1 Like

@bmcinnes Can understand your frustration. We will keep following this feature and update the community as soon as possible.