Configure the OTLP receiver to collect LlamaIndex metrics
Configure the Splunk Distribution of the OpenTelemetry Collector to send LlamaIndex metrics to Splunk Observability Cloud.
You can monitor the performance of your LlamaIndex platform by configuring the Splunk Distribution of the OpenTelemetry Collector to send LlamaIndex metrics to Splunk Observability Cloud.
This solution requires instrumenting your LlamaIndex application using the splunk-otel-instrumentation-llamaindex library. This package enables OpenTelemetry-based telemetry collection for LlamaIndex workloads and helps send generated telemetry data to Splunk Observability Cloud through the Splunk Distribution of the OpenTelemetry Collector.
To use this data integration, you must have a running LlamaIndex application instrumented with the splunk-otel-instrumentation-llamaindex package. Install and configure the package by following the official package documentation.
Configuration settings
Configuration settings for the OTLP receiver.
To view the configuration settings for the OTLP receiver, see Settings.
Metrics
The following metrics are available for LlamaIndex. For more information on these metrics, see Expected Output in the README.rst file of the splunk-otel-instrumentation-llamaindex directory.
These metrics are considered custom metrics in Splunk Observability Cloud.
| Metric name | Metric type | Description |
|---|---|---|
gen_ai.client.operation.duration |
histogram | The total time taken for a GenAI operation (such as a chat completion, completion, or embedding request) from the moment the request is sent until the final response is received. |
gen_ai.client.operation.time_to_first_chunk |
histogram | Measures the time elapsed between sending the request and receiving the first response chunk/token from the model. |
gen_ai.client.token.usage |
histogram | Records the number of tokens consumed by the operation. Depending on the instrumentation and attributes attached, it may include input (prompt) tokens and output (completion) tokens. |
Attributes
| Attribute name | Description |
|---|---|
gen_ai.framework |
The GenAI framework used by the application. For LlamaIndex applications, this value is llamaindex. |
gen_ai.operation.name |
The type of GenAI operation performed, such as chat, which identifies the LLM interaction. |
gen_ai.provider.name |
The GenAI provider used to process the request, such as cisco_circuit. |
gen_ai.request.model |
The name of the model requested by the application to process the GenAI request. |
gen_ai.response.model |
The name of the model that generated the response, when available. |
gen_ai.token.type |
Identifies whether the reported token usage represents input (prompt) tokens or output (completion) tokens. |
Next steps
After you set up data collection, the data populates built-in dashboards that you can use to monitor and troubleshoot your instances.
For more information on using built-in dashboards in Splunk Observability Cloud, see: