Getting started with Observability

Opik makes it easy to add observability to your existing LLM application. You can get started using Opik Connect for AI-assisted setup, the Opik skill for automated integration, or manually add tracing using the SDK.

Adding observability to your code

Opik Connect links your local repository to Opik so that Ollie, Opik’s AI coding assistant, can inspect your code, add tracing, and guide you through setup.

1

Install Opik

$pip install opik
2

Set your environment variables

$export OPIK_API_KEY="<YOUR_API_KEY>"
$export OPIK_WORKSPACE="<YOUR_WORKSPACE>"

You can find your API key and workspace name in the Opik dashboard.

3

Connect your repository

Run this command in the repository you want Ollie to work in:

$opik connect --project "<YOUR_PROJECT_NAME>"

This creates a local connection between Opik and your machine so Ollie can inspect your code and help add tracing.

Once connected, open Opik and Ollie will be able to help you instrument your code and set up tracing. See the Ollie documentation for more details.

Viewing your traces

After running your application, traces will appear in the Opik dashboard. Each trace captures the full execution path of a request, including all nested spans, inputs, outputs, and timing information.

Opik traces page showing trace details with span tree, outputs, and feedback scores

You can use Ollie to analyze your traces, identify issues in your agent’s behavior, and get actionable suggestions for improvement.

Next steps

  • Concepts — Learn about traces, spans, threads, and feedback scores
  • Log traces — In-depth guide on customizing what gets logged
  • Cost tracking — Monitor token usage and spending