Monitor OpenAI API with Java Agent

Note: This document contains references to the OpenAI® documentation. Splunk AppDynamics does not own any rights and assumes no responsibility for the accuracy or completeness of such third-party documentation.

The Java Agent helps you monitor the OpenAI API usage and related metrics. It monitors the Completion ChatCompletion Moderation APIs TheoKanning OpenAI Java framework to the OpenAI backend.

The following metrics are reported at the application, tier, and node levels:

  • Calls per minute
  • Cost
  • Errors per minute
  • Tokens

The following are the example metric paths:

  • Per model metric path- Application Infrastructure Performance|OpenAI_Tier|OpenAI|ada|Cost
  • All model cumulative metrics path- Application Infrastructure Performance|OpenAI_Tier|OpenAI|Cost - All Models
  • Net application level metrics path- Overall Application Summary|OpenAI - Cost - ada
Note: These metrics are reported even if the exit call is outside the business transaction. However, the Average Response Time(ms) metric is not reported when the exit call is outside the business transaction.