• /
  • Log in
  • Free account
Docs

Java agent API: Instrumenting example app for external datastore calls and CAT

This document demonstrates using the New Relic Java agent API to instrument a simple client and server application. The instrumentation has these goals:

See the Java agent API Javadoc for full descriptions of the available API classes and methods.

Important

For best results when using the API, ensure that you have the latest Java agent release. Several APIs used in the examples require Java agent 3.36.0 or higher.

Client-side example

Here is an example of the client-side code for a simple client-server application:

Here is the same client app code divided into sections that describe how the API is used:

Server-side example

Here is the server-side code for this example application:

Here is the same example server code broken into sections that describe how the API is used:

For more help

If you need more help, check out these support and learning resources:

Docs
Create issueEdit page
Copyright © 2021 New Relic Inc.