# Observability for Dify with Opik

> Start here to integrate Opik into your Dify-based genai application for end-to-end LLM observability, unit testing, and optimization.

Learn how to connect Opik with Dify to monitor your applications' performance.

## Setup Instructions

Follow these simple steps to connect Dify with Opik:

1. Select the Dify app you want to monitor
2. Select **Monitoring** from the side menu
3. Click on **Tracing app performance**
4. Click on **Configure** for Opik
5. Enter your connection details based on your Opik version:

<Frame>
  <img src="https://files.buildwithfern.com/https://opik.docs.buildwithfern.com/docs/opik/2026-01-30T17:33:07.444Z/img/tracing/dify_configuration.png" />
</Frame>

<Tabs>
  <Tab value="Hosted Opik" title="Hosted Opik">
    Fill in these fields:

    * **API Key**: Your Comet API Key
    * **Project**: Your preferred project name (if left empty, it will be created automatically)
    * **Workspace**: Your Comet Workspace name (must already exist)
    * **URL**: Your Opik installation URL (make sure it ends with `/api/`)
  </Tab>

  <Tab value="Self-Hosted Opik" title="Self-Hosted Opik">
    Fill in these fields:

    * **API Key**: Leave this empty
    * **Project**: Your preferred project name (if left empty, it will be created automatically)
    * **Workspace**: Type `default`
    * **URL**: Your Opik installation URL (make sure it ends with `/api/`)
  </Tab>
</Tabs>

## How to View Your Traces

After setup, you can view your application traces by:

1. Opening the **Monitoring** section from the side menu
2. Finding and clicking the **OPIK** button in the top-right corner
3. Selecting **View** to open your Opik project dashboard

<Frame>
  <img src="https://files.buildwithfern.com/https://opik.docs.buildwithfern.com/docs/opik/2026-01-30T17:33:07.444Z/img/tracing/dify_view_project.png" />
</Frame>