Skip to content

Commit

Permalink
improve javaagent upgrade page
Browse files Browse the repository at this point in the history
  • Loading branch information
obenkenobi committed Mar 29, 2024
1 parent 8f37edd commit 5bfbc57
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,12 @@ Then, to update to the latest Java agent version:
1. Back up the <DoNotTranslate>**entire**</DoNotTranslate> [Java agent root directory](/docs/agents/manage-apm-agents/troubleshooting/find-agent-root-directory#java-agent) to another location. Rename that directory to `NewRelic_Agent#.#.#`, where `#.#.#` is the agent version number.
2. [Download the agent.](/docs/release-notes/agent-release-notes/java-release-notes)
3. Unzip the new agent download file, then copy `newrelic-api.jar` and `newrelic.jar` into the original [Java agent root directory](/docs/agents/manage-apm-agents/troubleshooting/find-agent-root-directory#java-agent).
4. (Optional) If you are using the any of the agent APIs like our [Java Agent API](/docs/apm/agents/java-agent/api-guides/guide-using-java-agent-api/) or a [Scala API](/docs/apm/agents/java-agent/frameworks/scala-installation-java/#using-the-scala-api), it is recommended to upgrade your API dependencies as well to the latest version. Your newer version of the agent will still support the APIs but you may be missing new features plus upgrading is relatively easy. If you are using a build tool like maven, upgrade the API versions to latest. For example if you are using the Java Agent API with maven where `{agent.version}` is a placeholder for the upgraded agent version:
```xml
<dependency>
<groupId>com.newrelic.agent.java</groupId>
<artifactId>newrelic-api</artifactId>
<version>{agent.version}</version>
</dependency>
4. (Optional) If you are using the any of the agent APIs like our [Java Agent API](/docs/apm/agents/java-agent/api-guides/guide-using-java-agent-api/) or a [Scala API](/docs/apm/agents/java-agent/frameworks/scala-installation-java/#using-the-scala-api), it is recommended to upgrade your API dependencies as well to the latest version. Your newer version of the agent will still support the APIs but you may be missing new features plus upgrading is relatively easy. If you are using a build tool like maven, upgrade the API versions to latest. For example if you are using the Java Agent API with gradle where `${agent.version}` is a placeholder for the upgraded agent version:
```groovy
implementation 'com.newrelic.agent.java:newrelic-api:8.10.0'
```
5. Compare your old `newrelic.yml` with the newly downloaded `newrelic.yml` from the zip, and [update the file if needed](#diff).
6. Restart your Java dispatcher.
6. Restart your Java process.

If you experience issues after the Java agent update, restore from the backed-up New Relic agent directory.

Expand Down

0 comments on commit 5bfbc57

Please sign in to comment.