Configure the OTLP receiver to collect OpenAI metrics
Learn how to configure the OTLP receiver to collect OpenAI metrics.
You can monitor the performance of OpenAI services by configuring your OpenAI services to send metrics to Splunk Observability Cloud. This solution uses the OpenTelemetry instrumentation to collect metrics from OpenAI services.
Complete the following steps to collect metrics from and monitor the performance of OpenAI services.
Configure and activate the component for OpenAI
Learn how to configure and activate the component for OpenAI services.
Complete the following steps to configure and activate the component for OpenAI.
- Deploy the Splunk Distribution of the OpenTelemetry Collector to your host or container platform:
- Start the Splunk Distribution of the OpenTelemetry Collector.
- Deploy the Python agent in your OpenAI service:
- Install the Splunk Distribution of OpenTelemetry Python using the guided setup or manual method.
- Install the Generative AI/LLM instrumentation by following the steps on OpenTelemetry OpenAI Instrumentation in the OpenTelemetry Python Contrib GitHub repository. You can use zero-code instrumentation or manual instrumentation.
- Run the service.
Monitor the performance of OpenAI services
Learn how to navigate to the OpenAI navigator, which you can use to observe the performance of OpenAI services.
Complete the following steps to access the OpenAI navigator and monitor the performance of OpenAI services. For more information on navigators, see Use navigators and Monitor LLM costs with navigators.
- From the Splunk Observability Cloud main menu, select Infrastructure.
- Under AI/ML, select AI Frameworks.
- Select the OpenAI summary card.
Metrics and attributes
Learn about the monitoring metrics available for OpenAI services.
Metric name | Histogram function | Instrument type | Unit | Description | Resource attributes |
---|---|---|---|---|---|
gen_ai.client.token.usage | input | histogram | count | Number of input tokens processed. |
|
gen_ai.client.token.usage | output | histogram | count | Number of output tokens processed. |
|
gen_ai.client.token.usage | sum | histogram | count | Sum of tokens processed. |
|
gen_ai.client.token.usage | max | histogram | count | Max number of total tokens processed. |
|
gen_ai.client.token.usage | min | histogram | count | Min number of total tokens processed. |
|
gen_ai.client.operation.duration | sum | histogram | s | Total time of durations. |
|
gen_ai.client.operation.duration | max | histogram | s | Max length of durations. |
|
gen_ai.client.operation.duration | min | histogram | s | Min length of durations. |
|
gen_ai.client.operation.duration | count | histogram | count | Count of durations. |
|
Troubleshoot
Learn how to get help if you can't see your data in Splunk Observability Cloud.
If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways:
Splunk Observability Cloud customers can submit a case in the Splunk Support Portal or contact Splunk Support.
Prospective customers and free trial users can ask a question and get answers through community support in the Splunk Community.