New features and improvements
Added support for Webflux 6 1181
Added support for Spring JMS 6 1088
Added support for Mongodb Reactive Streams 1164
Added support for Kafka Streams 1170
Support for Kafka Streams comes in two flavors, metrics and spans. Metrics are enabled by default, while spans are disabled by default. To enable spans add the following to your newrelic.yml configuration under the common section:
common: class_transformer: kafka-streams-spans: enabled: true
Error fingerprint - supply your own errors inbox group names 1195
Are your error occurrences grouped poorly? Set your own error fingerprint via a callback function. A new public API method has been added that will accept a user defined proc. The proc will be invoked for each noticed error and whenever it returns a string, that string will be used as the error group name for the error and will take precedence over any server-side grouping that takes place with the New Relic errors inbox. This gives users much greater control over the grouping of their errors. For more information check our API: Error Grouping and APM: Group errors tab pages.
User tracking - associate errors with a user id 1188
You can now see the number of users impacted by an error group. Identify the end user with a new public API method that will accept a string representation of a user id and associate that user id with the current transaction. Transactions and errors will then have a new
enduser.id
agent attribute associated with them. This will allow agent users to tag transactions and errors as belonging to given user ids in support of greater filtering and alerting capabilities. For more information check the [Newrelic.setUserId ](https://newrelic.github.io/java-agent-api/javadoc/com/newrelic/api/agent/NewRelic.html#setUserName(java.lang.String) documentation and the Track users impacted with errors inbox page.Invoking
token.link()
outside a transaction will instrument that method to start an async transaction 1140The Kafka clients instrumentation has new metrics to list the nodes:
MessageBroker/Kafka/Nodes/<node>
1130
Fixes
- Fix ClassCircularityError when agent attaches 1137
- Fix NullPointerException thrown when calling
addCustomAttributes
1115 - Make sure
TokenAndRefCount.token
is never null 1149 - Using a time based cache to store database connection data to prevent a memory leak when instrumenting MySQL client with replication 1114
- Decreased the number of threads used in the HttpUrlConnection instrumentation 1145
- Fix an issue when HttpUrlConnection is used with the legacy cross application tracing 1142
- Performance improvement in Netty’s RequestWrapper 1163
- Gracefully shutdown the agent if it encounters issues on startup 1136
- Fix WeavedMethod and InstrumentedMethod annotations when applied to constructors. 1153
- Performance improvements when using Tomcat 1131
- Fixed a bug that caused the agent to not report some exceptions 1176
- Updated DockerData to increase the number of container IDs detected 1178
- Reduce the number of threads used in Kafka clients instrumentation 1056
- Grammar changes [1175](https://github.com/newrelic/newrelic-java-agent/pull/1175 and [1190][https://github.com/newrelic/newrelic-java-agent/pull/1190](https://github.com/newrelic/newrelic-java-agent/pull/1190))
Update to latest version
To identify which version of the Java agent you're currently using, run java -jar newrelic.jar -v
. Your Java agent version will be printed to your console.
Then, to update to the latest Java agent version:
- Back up the entire Java agent root directory to another location. Rename that directory to
NewRelic_Agent#.#.#
, where#.#.#
is the agent version number. - Download the agent.
- Unzip the new agent download file, then copy
newrelic-api.jar
andnewrelic.jar
into the original Java agent root directory. - Compare your old
newrelic.yml
with the newly downloadednewrelic.yml
from the zip, and update the file if needed. - Restart your Java dispatcher.
If you experience issues after the Java agent update, restore from the backed-up New Relic agent directory.
Update agent config differences
We add new settings to newrelic.yml
as we release new versions of the agent. You can use diff
or another diffing utility to see what's changed, and add the new config settings to your old file. Make sure not to overwrite any customizations you've made to the file, such as your license key, app name, or changes to default settings.
For example, if you diff
the default newrelic.yml
files for Java agent versions 7.10.0 and 7.11.0, the results printed to the console will be like:
➜ diff newrelic_7.10.0.yml newrelic_7.11.0.yml...107a108,119> # Whether the log events should include context from loggers with support for that.> include_context_data:>> # When true, application logs will contain context data.> enabled: false>> # A comma separated list of attribute keys whose values should be sent to New Relic.> #include:>> # A comma separated list of attribute keys whose values should not be sent to New Relic.> #exclude:>125a138>128c141< enabled: false---> enabled: true...
In this example, these lines were added to the default newrelic.yml
in Java agent version 7.11.0. If you are moving to 7.11.0 or higher, you should add these new lines to your original newrelic.yml
.
Support statement:
- New Relic recommends that you upgrade the agent regularly to ensure that you're getting the latest features and performance benefits. Additionally, older releases will no longer be supported when they reach end-of-life.