Disable Scala, Netty, Akka, and Play 2 Instrumentation

This document describes how to disable Java agent instrumentation on these popular async frameworks:

Scala

Netty

Akka

Play 2

You may choose to disable some or all of this instrumentation if you find that the metrics reported aren't valuable to you, or if the instrumentation incurs more overhead than you would like. If you selectively disable some of the instrumentation, some segments of activity will not be reported and your total time will be understated.

Contents

Java agent versions 3.21 or lower

If you are using Java agent version 3.22 or lower, add the following to the class_transformer section of your newrelic.yml settings:

Java agent versions 3.22 or higher

The older Scala, Netty, Akka, and Play 2 Framework instrumentation configuration names have been deprecated as of Java Agent version 3.22. For those using Java Agent 3.22 or higher, add the following to the class_transformer section of your newrelic.yml settings:

The pre-3.22 instrumentation names will be respected for a time, but they will be removed in future releases. If disabled by either the old or new instrumentation configuration, the instrumentation will be disabled.

Check for deprecated configuration settings

Any use of the pre-3.22 instrumentation names will be logged with messages similar to:

INFO: The configuration setting akka_instrumentation is deprecated, please update the class_transformer config to use com.newrelic.instrumentation.akka-2.2 instead

Using the deprecated settings does not indicate the deprecated instrumentation has been loaded or is being used. These messages are hints to the user that it is time to update your configuration settings.

Play 2.4 does not respect the older play2_instrumentation configuration settings, as it is a new instrumentation. In all cases, if you are using Java agent version 3.22 or higher, you should use the new instrumentation names for the Scala, Netty, Akka, and Play 2 framework in their newrelic.yml.