• /
  • EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Java agent API: Custom instrumentation with annotation of an example app

The New Relic Java agent API lets you set up custom instrumentation for your Java application. This document shows an example of using custom instrumentation with annotation in an imaginary application.

Importante

For best results when using the API, ensure you have the latest Java agent release.

Complete example app using API

Below is an example of an imaginary store app's servlet using the Java agent API.

Sugerencia

If you copy and paste example code, be sure to use appropriate spacing on your command lines.

How the example uses the API

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

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.