To ensure that you have the most up-to-date version of New Relic, refer to the Java agent release notes. If your agent is outdated, follow this procedure. These steps describe replacing some of the current contents of your agent root directory containing the New Relic Java agent (
newrelic.jar) with newly downloaded contents from the New Relic UI.
Agent update procedures
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.
- Back up the entire Java agent root directory to another location. Rename that directory to
#.#.#is the agent version number.
- Go to rpm.newrelic.com/apm > (select your account name) > Account settings.
- Download the agent for your platform.
- Unzip the new agent download file, then copy
newrelic.jarinto the original Java agent root directory.
newrelic.ymlwith the newly downloaded
newrelic.ymlfrom the zip, and update customized differences as needed.
- Restart your Java dispatcher.
If you experience issues after the Java agent upgrade, restore from the backed-up New Relic agent directory.
Update agent config differences
If differences between the two versions are unrelated to your app's customizations, align the
newrelic.yml you use moving forward with the latest updates to the default
newrelic.yml from New Relic.
For example, if you
diff the default
newrelic.yml files for Java agent versions 3.29.0 and 3.30.0, the results printed to the console will be:
➜ diff newrelic_3.29.0.yml newrelic_3.30.0.yml 254a255,265 > # Classes loaded by classloaders in this list will not be instrumented. > # This is a useful optimization for runtimes which use classloaders to > # load dynamic classes which the agent would not instrument. > classloader_excludes: > groovy.lang.GroovyClassLoader$InnerLoader, > org.codehaus.groovy.runtime.callsite.CallSiteClassLoader, > com.collaxa.cube.engine.deployment.BPELClassLoader, > org.springframework.data.convert.ClassGeneratingEntityInstantiator$ObjectInstantiatorClassGenerator, > org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer$ContextClassLoader, > gw.internal.gosu.compiler.SingleServingGosuClassLoader, >
These lines were added to the default
newrelic.yml in Java agent version 3.30.0. If you want to run Java agent version 3.30.0 or higher, ensure you include these lines in your
For more help
Additional documentation resources include: