> ## Documentation index
> Fetch the complete documentation index at: https://arize.com/llms.txt
> Ask it with GET https://arize.com/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# Dify Tracing

> Configure your Dify application to view traces in Phoenix

## Launch Phoenix

<Card>
  <Tabs>
    <Tab title="Local">
      ```bash
uvx arize-phoenix serve
```

No [uv](https://docs.astral.sh/uv/)? `pip install arize-phoenix && phoenix serve` does the same thing. See [Terminal setup](/docs/phoenix/environments#terminal) for customization.

    </Tab>

    <Tab title="Container">
      ```bash
docker run -p 6006:6006 -p 4317:4317 arizephoenix/phoenix:latest
```

Images are published to [Docker Hub](https://hub.docker.com/r/arizephoenix/phoenix). See [Docker](/docs/phoenix/self-hosting/deployment-options/docker) for volumes, PostgreSQL, and other options.

    </Tab>

    <Tab title="Self-Host">
      Run Phoenix on your own infrastructure, backed by PostgreSQL so traces persist beyond a single process. This is the option to reach for once Phoenix is shared across a team or environment.

The [self-hosting guide](/docs/phoenix/self-hosting) covers [Kubernetes](/docs/phoenix/self-hosting/deployment-options/kubernetes), [Helm](/docs/phoenix/self-hosting/deployment-options/kubernetes-helm), [Railway](/docs/phoenix/self-hosting/deployment-options/railway), [AWS CloudFormation](/docs/phoenix/self-hosting/deployment-options/aws-with-cloudformation), [Google Cloud Run](/docs/phoenix/self-hosting/deployment-options/google-cloud-run), [Azure](/docs/phoenix/self-hosting/deployment-options/azure), and [Render](/docs/phoenix/self-hosting/deployment-options/render), plus authentication and configuration.

    </Tab>

  </Tabs>

  Phoenix serves its UI and OTLP HTTP on port **6006**, and OTLP gRPC on port **4317**. For a local instance that's [http://localhost:6006](http://localhost:6006). Leave it running while you work.
</Card>

Dify connects to Phoenix over the network, so it needs the endpoint you just started — and an API key if the instance requires one.

<Note>
  Pointing at a deployment with [authentication](/docs/phoenix/self-hosting/features/authentication) enabled? Set `PHOENIX_COLLECTOR_ENDPOINT` to that deployment's OTLP HTTP traces URL, for example `https://your-phoenix.example.com/v1/traces`, and `PHOENIX_API_KEY` to an API key from its **Settings** page. A local `phoenix serve` needs no key.
</Note>

## Connect Dify and Phoenix

To configure Phoenix tracing in your Dify application:

1. Open the Dify application you want to monitor.

2. In the left sidebar, navigate to **Monitoring**.

3. On the Monitoring page, select Phoenix in the Tracing drop down to begin setup.

4. Enter your Phoenix credentials and save. You can verify the monitoring status on the current page.

<Frame>
  <iframe src="https://cdn.iframe.ly/JC08HhsU" allowFullScreen className="aspect-video"></iframe>
</Frame>

## Observe

View Dify traces in Phoenix. Get rich details into tool calls, session data, workflow steps, and more.

<Frame>
![](https://storage.googleapis.com/arize-phoenix-assets/assets/images/phoenix-dify-traces.png)
</Frame>

## Resources

* Learn more details about the tracing data captured in the [Dify documentation](https://docs.dify.ai/en/guides/monitoring/integrate-external-ops-tools/integrate-phoenix)
