• /
  • EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

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.

重要

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.

ヒント

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株式会社。

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