The Java agent is a fully-featured library that automatically collects data from many popular servers, frameworks, libraries, and datastores (for a full list, see Compatibility and requirements). It also has a significant feature set. However, there are always additional requests for functionality and instrumentation of new libraries. The Java agent provides extension modules for this purpose.
Extension modules fall into three general categories:
Archived instrumentation modules: Instrumentation for libraries that the original company or author no longer maintains or updates.
Feature extension modules: Code that adds new behavior to the agent, independent of any specific library.
If your library isn't covered by the automatic instrumentation or by an instrumentation module, you can still collect data with custom instrumentation.
Dica
If you have feedback, questions, or problems with this instrumentation, create a post in New Relic's Support Forum, and tag your post with java_incubator.
Download the appropriate .jar file from module lists below.
Locate the directory that contains your newrelic.jar and newrelic.yml files. In that directory, create a sub-directory named extensions (if there is not already one there).
Copy the .jar extension module you downloaded into the extensions directory.
For Feature extension modules, update your newrelic.yml with feature-specific configuration.
Restart your server.
Send some traffic to the server or host that will exercise the feature or instrumentation.
Dica
Java agent extension modules are subject to the New Relic Java agent licenses, which are included in each module jar's LICENSE file.
Feature extension modules
Extension modules are additional libraries that add commonly-requested functionality.
To use the an extension module, download it and put it in the Extensions Directory.
The Class Histogram extension runs jmap periodically and generates ClassHistogramRowEvent and ClassHistogramStatsEvent data that you can query and chart. Querying this data can be useful when troubleshooting memory leaks as you can see the values over time.
You configure the Class Histogram extension the same way you configure the Java agent: using environment variables, system properties, or newrelic.yml. Here are available properties, with defaults:
extensions:
class_histogram:
enabled:true# true is the default if the extension is present
classes_per_histogram:50# 50 is the default, and memory leak issues are usually in the highest 50 classes by bytes
jmap_path: /your/jdk/bin # The folder where the jmap binary lives. The default is $JAVA_HOME/bin.
delay_between_calls_seconds:60# Length of the delay between executions to avoid frequent pauses
Incubator instrumentation modules
Incubator modules are experimental instrumentation, which we may build into the agent's automatic instrumentation in the future.
These are the incubator modules that are currently available:
This instrumentation module integrates with the MetricRegistry and begins sampling the registered metrics every minute. Reported metrics are prefixed with this:
This instrumentation module integrates with the MetricRegistry and begins sampling the registered metrics every minute. Reported metrics are prefixed with this:
This instrumentation module adds support for async linking of Ratpack's execution primitives. It also monitors handler execution. You must name the transactions manually by using the Java agent API.
This instrumentation captures Ratpack's HTTP client requests and responses.
Archived instrumentation modules
Archived modules are instrumentation for libraries that are no longer maintained by the original company or author. Because the target library isn't being updated, our support for archived modules has designated end dates.
These are the archived modules that are currently available:
This module provides link instrumentation between actors that send and receive messages. It also traces messages broadcast by or forwarded to actors. In order to avoid over-instrumentation, this instrumentation does not start transactions. If you would like a given actor call to mark the beginning of a transaction, use the @Trace(dispatcher=true) annotation, or some other form of custom instrumentation.
This module provides link instrumentation between actors that send and receive messages. It also traces messages broadcast by or forwarded to actors. In order to avoid over-instrumentation, this instrumentation does not start transactions. If you would like a given actor call to mark the beginning of a transaction, use the @Trace(dispatcher=true) annotation, or some other form of custom instrumentation.
This module creates transactions from Akka HTTP calls. It also instruments hand-offs between Akka actors, and calls from Akka to other databases and services.
For calling systems, this instrumentation collects cross application traces. If you're using a supported Akka version, you can view activity from your Akka HTTP apps from transactions all the way through your actor systems.
This module creates transactions from Akka HTTP calls. It also instruments hand-offs between Akka actors, and calls from Akka to other databases and services.
For calling systems, this instrumentation collects cross application traces. If you're using a supported Akka version, you can view activity from your Akka HTTP apps from transactions all the way through your actor systems.
This module creates transactions from Akka HTTP calls. It also instruments hand-offs between Akka actors, and calls from Akka to other databases and services.
For calling systems, this instrumentation collects cross application traces. You can use this instrumentation together with our built previously released support for Akka, to view activity from your Akka HTTP apps from transactions all the way through to your actor systems.
This module instruments database calls to Solr servers, and collects detailed information about the Solr server itself. It also provides the database server and database name for the queries displayed in transaction traces and slow query traces.
This module instruments database calls to Solr servers, and collects detailed information about the Solr server itself. It also provides the database server and database name for the queries displayed in transaction traces and slow query traces.
This module instruments database calls to Solr servers, and collects detailed information about the Solr server itself. It also provides the database server and database name for the queries displayed in transaction traces and slow query traces.