langflow/docs/docs/Integrations/integrations-opik.md
Boris Feld 8c2f6addf2
feat: add new Opik Tracer (#6928)
* feat: add new Opik Tracer

This PR adds a new Tracer to sends traces and spans to Opik.

* Fix typo in docs

* Optimize Opik integration to reduce number of HTTP calls

* Add session_id and user_id to the Opik tracer

* Check Opik configuration on the client side before making a remote check

* Tackle documentation reviews

* Apply suggestions from code review

Co-authored-by: Jacques Verré <jverre@gmail.com>

* Fix one of the doc link

* Explicitely check for Opik environment variables before enabling the Opik tracer

* test: add opik tracing unit tests

---------

Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com>
Co-authored-by: Jacques Verré <jverre@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2025-03-21 18:18:19 +00:00

1.9 KiB

title slug
Opik /integrations-opik

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

Integrate Opik with Langflow

Opik is an open-source platform designed for evaluating, testing, and monitoring large language model (LLM) applications. Developed by Comet, it aims to facilitate more intuitive collaboration, testing, and monitoring of LLM-based applications.

This guide walks you through how to configure Langflow to collect tracing data about your flow executions and automatically send the data to Opik.

Prerequisites

  • A project in Langflow with a runnable flow
  • An Open-Source Opik server or an Opik Cloud account - You can learn more about the differences here
  • If you are using Opik Cloud, you will also need your Opik API key

Set your Opik configuration as environment variables

Call the CLI opik configure to save your Opik configuration in the same environment where you run Langflow.

opik configure

For self-hosted Opik, you can also configure it using the Opik CLI by running the following command:

opik configure --use_local

See the Opik documentation for more ways to configure Opik SDKs.

Start Langflow and run a flow

  1. Start Langflow in the same terminal or environment where you set the environment variables:
uv run langflow run
  1. In Langflow, open an existing project, and then run a flow.

  2. Navigate to your Opik project dashboard and view the collected tracing data.

Disable the Opik integration

To disable the Opik integration, remove the environment variables you set in the previous steps and restart Langflow.