AppDynamics Python Agent helps you monitor the OpenAI API usage and related metrics. It monitors the ChatCompletion and Completion type requests created using the openai-python framework to the OpenAI backend.
Python Agent supports OpenAI <= 0.28.1.
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
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.
Prerequisites
Ensure that you meet the following prerequisites to monitor the OpenAI API exit calls with AppDynamics: