# Observability

First-class, built-in observability to understand the operations Spice performs.

Observability in Spice enables task tracking and performance monitoring through a built-in distributed tracing system that can [export to Zipkin](https://spice.ai/docs/features/observability/zipkin) or be viewed via the [`runtime.task_history`](https://spice.ai/docs/features/observability/task-history) SQL table.

Spice records detailed information about runtime operations through trace IDs, timings, and labels - from SQL queries to AI completions. This task history system helps operators monitor performance, debug issues, and understand system behavior across individual requests and overall patterns.

## Use-Cases

### Debugging and Troubleshooting

- Trace AI chat completion steps and tool interactions to identify why a request isn't responding as expected
- Investigate failed queries and other task errors

### Performance Analysis

- Track SQL query/tool use execution times
- Identify slow-running tasks

### Usage Analytics

- Track usage patterns by protocol and dataset
- Understand how AI models are using tools to retrieve data from the datasets available to them

## Portal Interface

The Spice platform provides a built-in UI for visualizing the observability traces that Spice OSS generates.

![The Observability tab shows the span tree for one ai\_chat request. The ai\_chat span contains two ai\_completion spans and the list\_datasets and document\_similarity tool calls. Under document\_similarity, a vector\_search span contains a text\_embed span and three sql\_query spans. The detail pane shows the user message 'How do I set up a Spice application?', the JSON input, and the Markdown answer. A side panel shows the openai model and a duration of 6.456 seconds.](https://spice.ai/website-assets/docs/observability-ai-chat-trace.png)

An observability trace for an AI chat completion in the Spice portal.
