> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate with Arize

### What is Arize

[Arize AX](https://arize.com/products/ax/) is [Arize AI](https://arize.com/?utm_source=dify-docs\&utm_medium=partner\&utm_campaign=partner-docs\&utm_content=integrate-arize)'s full-featured platform for observability, online and offline evaluation, monitoring, and experimentation in LLM and agent-driven applications. Built for production teams, AI-native companies, and enterprises, it runs as a managed cloud service or an enterprise self-hosted deployment.

If you'd rather run an open-source stack for experimentation or single-container self-hosting, set up the [Phoenix integration](https://docs.dify.ai/en/cloud/use-dify/monitor/integrations/integrate-phoenix.md) instead.

Once traces are flowing, see Arize's [agent evaluation guide](https://arize.com/ai-agents/agent-evaluation/) and [LLM evaluation guide](https://arize.com/resources/llm-evaluation/) for how to use them to debug failures, evaluate agent behavior, and monitor model quality.

### How to Configure Arize

#### 1. Register/Login to [Arize](https://app.arize.com/auth/join)

#### 2. Get your Arize API Key

Retrieve your Arize API Key from the user menu at the top-right. Click on **API Key**, then on the API Key to copy it:

![Arize API Key](https://i.ibb.co/JwBmQxnf/dify-docs-arize-api-key.png)

#### 3. Integrate Arize with Dify

Configure Arize in the Dify application. Open the application you need to monitor, open **Monitoring** in the side menu, and select **Tracing app performance** on the page.

![Tracing App Performance](https://i.ibb.co/v6cL6rPs/dify-docs-arize-in-use.png)

After clicking configure, paste the **API Key**, **Space ID** and **project name** into the configuration and save. **Endpoint** defaults to `https://otlp.arize.com` and must identify an OTLP/gRPC collector. URL paths are not used; do not enter an HTTP `/v1/traces` endpoint.

![Configure Arize](https://i.ibb.co/m5Xww8gL/dify-docs-arize-config.png)

Once successfully saved, you can view the monitoring status on the current page.

![Configure Arize](https://i.ibb.co/xtggVmb7/dify-docs-arize-in-service.png)

> [!NOTE]
>
> After saving and enabling tracing, run the app again and check for a new trace in the monitoring service. Delivery is asynchronous; saving the configuration alone does not confirm that a trace has arrived.
>
> For the new Agent app type and workflows using the [new Agent node](https://docs.dify.ai/en/cloud/use-dify/nodes/agent.md#new-agent), **Capture content** is off by default: inputs, outputs, and most metadata are removed, and error text is redacted across the whole workflow. Enable it to send that content. Classic `agent-chat` apps and workflows using only classic Agent nodes retain ordinary tracing.

### Monitoring Data List

The tables below describe ordinary traces. For the new Agent app type or workflows containing a new Agent node, traces use a new UUIDv7 trace ID, with source and tracing-run IDs retained as `dify.source.id` and `dify.tracing.run_id` attributes. For the new Agent app type, `Agent attempt` spans with internal model and tool calls replace the ordinary `llm` span when **Capture Agent internals** is on. Separate moderation, suggested-question, and naming records are omitted for collected runs.

Dify exports a hierarchy of operations: a message contains an `llm` call, and a Chatflow message contains its workflow and node operations. Trace IDs preserve the value of nonzero UUID or 32-hex message, workflow run, or caller-supplied IDs; other values are hashed. Span IDs are derived. A supplied `X-Trace-Id` takes precedence over the message or workflow run ID. Native token usage is reported on model calls only.

Each span's `user.id` uses `end_user_session_id` when available, otherwise `user_id`. The separate `metadata.user_id` field keeps the Dify user record ID.

The detail lists below describe Dify's source records and metadata. Only the relevant, available values are exported; the raw records are not sent in full.

#### **Workflow/Chatflow Trace Information**

**Used to track workflows and chatflows**

<table>
  <thead>
    <tr>
      <th>Workflow</th>
      <th>Arize Trace</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>workflow\_run\_id</td>
      <td>metadata.workflow\_run\_id</td>
    </tr>

    <tr>
      <td>user\_id</td>
      <td>user.id (fallback); metadata.user\_id</td>
    </tr>

    <tr>
      <td>workflow</td>
      <td>name</td>
    </tr>

    <tr>
      <td>start\_time</td>
      <td>start\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>end\_time</td>
      <td>end\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>inputs</td>
      <td>input.value</td>
    </tr>

    <tr>
      <td>outputs</td>
      <td>output.value</td>
    </tr>

    <tr>
      <td>Model token consumption (LLM calls)</td>
      <td>llm.token\_count.prompt / completion / total</td>
    </tr>

    <tr>
      <td>metadata</td>
      <td>metadata</td>
    </tr>

    <tr>
      <td>error</td>
      <td>status.code / status.message</td>
    </tr>

    <tr>
      <td>Session ID</td>
      <td>session.id</td>
    </tr>
  </tbody>
</table>

**Workflow Trace Info**

* workflow\_id - Unique identifier of the workflow
* conversation\_id - Conversation ID
* workflow\_run\_id - ID of the current run
* tenant\_id - Tenant ID
* elapsed\_time - Time taken for the current run
* status - Run status
* version - Workflow version
* total\_tokens - Total tokens used in the current run
* file\_list - List of processed files
* triggered\_from - Source that triggered the current run
* workflow\_run\_inputs - Input data for the current run
* workflow\_run\_outputs - Output data for the current run
* error - Errors encountered during the current run
* query - Query used during the run
* workflow\_app\_log\_id - Workflow application log ID
* message\_id - Associated message ID
* start\_time - Start time of the run
* end\_time - End time of the run
* workflow node executions - Information about workflow node executions
* Metadata
  * workflow\_id - Unique identifier of the workflow
  * conversation\_id - Conversation ID
  * workflow\_run\_id - ID of the current run
  * tenant\_id - Tenant ID
  * elapsed\_time - Time taken for the current run
  * status - Run status
  * version - Workflow version
  * total\_tokens - Total tokens used in the current run
  * file\_list - List of processed files
  * triggered\_from - Source that triggered the current run

#### **Message Trace Information**

**Used to track LLM-related conversations**

<table>
  <thead>
    <tr>
      <th>Chat</th>
      <th>Arize Trace</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>message\_id (unless X-Trace-Id is supplied)</td>
      <td>trace\_id</td>
    </tr>

    <tr>
      <td>end\_user\_session\_id</td>
      <td>user.id; metadata.end\_user\_session\_id</td>
    </tr>

    <tr>
      <td>message</td>
      <td>name</td>
    </tr>

    <tr>
      <td>start\_time</td>
      <td>start\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>end\_time</td>
      <td>end\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>inputs</td>
      <td>input.value</td>
    </tr>

    <tr>
      <td>outputs</td>
      <td>output.value</td>
    </tr>

    <tr>
      <td>Model token consumption (LLM calls)</td>
      <td>llm.token\_count.prompt / completion / total</td>
    </tr>

    <tr>
      <td>metadata</td>
      <td>metadata</td>
    </tr>

    <tr>
      <td>Session ID</td>
      <td>session.id</td>
    </tr>
  </tbody>
</table>

**Message Trace Info**

* message\_id - Message ID
* message\_data - Message data
* end\_user\_session\_id - User session ID
* conversation\_model - Conversation mode
* message\_tokens - Number of tokens in the message
* answer\_tokens - Number of tokens in the answer
* total\_tokens - Total number of tokens in the message and answer
* error - Error information
* inputs - Input data
* outputs - Output data
* file\_list - List of processed files
* start\_time - Start time
* end\_time - End time
* conversation\_mode - Conversation mode
* Metadata
  * conversation\_id - Conversation ID
  * ls\_provider - Model provider
  * ls\_model\_name - Model ID
  * status - Message status
  * from\_end\_user\_id - ID of the sending user
  * from\_account\_id - ID of the sending account
  * agent\_based - Whether the message is agent-based
  * workflow\_run\_id - Workflow run ID
  * from\_source - Message source

#### **Moderation Trace Information**

**Used to track conversation moderation**

<table>
  <thead>
    <tr>
      <th>Moderation</th>
      <th>Arize Tool</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>user\_id</td>
      <td>user.id (fallback); metadata.user\_id</td>
    </tr>

    <tr>
      <td>moderation</td>
      <td>name</td>
    </tr>

    <tr>
      <td>start\_time</td>
      <td>start\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>end\_time</td>
      <td>end\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>inputs</td>
      <td>input.value</td>
    </tr>

    <tr>
      <td>action, flagged</td>
      <td>output.value</td>
    </tr>

    <tr>
      <td>metadata</td>
      <td>metadata</td>
    </tr>
  </tbody>
</table>

**Moderation Trace Info**

* message\_id - Message ID
* user\_id: User ID
* workflow\_app\_log\_id - Workflow application log ID
* inputs - Moderation input data
* message\_data - Message data
* flagged - Whether the content is flagged for attention
* action - Specific actions taken
* preset\_response - Preset response
* start\_time - Moderation start time
* end\_time - Moderation end time
* Metadata
  * message\_id - Message ID
  * action - Specific actions taken
  * preset\_response - Preset response

#### **Suggested Question Trace Information**

**Used to track suggested questions**

Sent as a tool span in the message's trace.

<table>
  <thead>
    <tr>
      <th>Suggested Question</th>
      <th>Arize Tool span</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>user\_id</td>
      <td>user.id (fallback); metadata.user\_id</td>
    </tr>

    <tr>
      <td>"suggested\_question"</td>
      <td>name</td>
    </tr>

    <tr>
      <td>start\_time</td>
      <td>start\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>end\_time</td>
      <td>end\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>inputs</td>
      <td>input.value</td>
    </tr>

    <tr>
      <td>suggested\_question</td>
      <td>output.value</td>
    </tr>

    <tr>
      <td>metadata</td>
      <td>metadata</td>
    </tr>
  </tbody>
</table>

**Message Trace Info**

* message\_id - Message ID
* message\_data - Message data
* inputs - Input content
* outputs - Output content
* start\_time - Start time
* end\_time - End time
* total\_tokens - Number of tokens
* status - Message status
* error - Error information
* from\_account\_id - ID of the sending account
* agent\_based - Whether the message is agent-based
* from\_source - Message source
* model\_provider - Model provider
* model\_id - Model ID
* suggested\_question - Suggested question
* level - Status level
* status\_message - Status message
* Metadata
  * message\_id - Message ID
  * ls\_provider - Model provider
  * ls\_model\_name - Model ID
  * status - Message status
  * from\_end\_user\_id - ID of the sending user
  * from\_account\_id - ID of the sending account
  * workflow\_run\_id - Workflow run ID
  * from\_source - Message source

#### **Dataset Retrieval Trace Information**

**Used to track knowledge base retrieval**

<table>
  <thead>
    <tr>
      <th>Dataset Retrieval</th>
      <th>Arize Retriever</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>user\_id</td>
      <td>user.id (fallback); metadata.user\_id</td>
    </tr>

    <tr>
      <td>"dataset\_retrieval"</td>
      <td>name</td>
    </tr>

    <tr>
      <td>start\_time</td>
      <td>start\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>end\_time</td>
      <td>end\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>inputs</td>
      <td>input.value</td>
    </tr>

    <tr>
      <td>documents</td>
      <td>output.value</td>
    </tr>

    <tr>
      <td>metadata</td>
      <td>metadata</td>
    </tr>

    <tr>
      <td>ID derived from message\_id</td>
      <td>parent\_span\_id</td>
    </tr>
  </tbody>
</table>

**Dataset Retrieval Trace Info**

* message\_id - Message ID
* inputs - Input content
* documents - Document data
* start\_time - Start time
* end\_time - End time
* message\_data - Message data
* Metadata
  * message\_id - Message ID
  * ls\_provider - Model provider
  * ls\_model\_name - Model ID
  * status - Message status
  * from\_end\_user\_id - ID of the sending user
  * from\_account\_id - ID of the sending account
  * agent\_based - Whether the message is agent-based
  * workflow\_run\_id - Workflow run ID
  * from\_source - Message source

#### **Tool Trace Information**

**Used to track tool invocation**

<table>
  <thead>
    <tr>
      <th>Tool</th>
      <th>Arize Tool</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>user\_id</td>
      <td>user.id (fallback); metadata.user\_id</td>
    </tr>

    <tr>
      <td>tool\_name</td>
      <td>name</td>
    </tr>

    <tr>
      <td>start\_time</td>
      <td>start\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>end\_time</td>
      <td>end\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>tool\_inputs</td>
      <td>input.value</td>
    </tr>

    <tr>
      <td>tool\_outputs</td>
      <td>output.value</td>
    </tr>

    <tr>
      <td>metadata</td>
      <td>metadata</td>
    </tr>
  </tbody>
</table>

#### **Tool Trace Info**

* message\_id - Message ID
* tool\_name - Tool name
* start\_time - Start time
* end\_time - End time
* tool\_inputs - Tool inputs
* tool\_outputs - Tool outputs
* message\_data - Message data
* error - Error information, if any
* inputs - Inputs for the message
* outputs - Outputs of the message
* tool\_config - Tool configuration
* time\_cost - Time cost
* tool\_parameters - Tool parameters
* file\_url - URL of the associated file
* Metadata
  * message\_id - Message ID
  * tool\_name - Tool name
  * tool\_inputs - Tool inputs
  * tool\_outputs - Tool outputs
  * tool\_config - Tool configuration
  * time\_cost - Time cost
  * error - Error information, if any
  * tool\_parameters - Tool parameters
  * message\_file\_id - Message file ID
  * created\_by\_role - Role of the creator
  * created\_user\_id - User ID of the creator

**Generate Name Trace Information**

**Used to track conversation title generation**

<table>
  <thead>
    <tr>
      <th>Generate Name</th>
      <th>Arize Tool</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>user\_id</td>
      <td>user.id (fallback); metadata.user\_id</td>
    </tr>

    <tr>
      <td>generate\_name</td>
      <td>name</td>
    </tr>

    <tr>
      <td>start\_time</td>
      <td>start\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>end\_time</td>
      <td>end\_time\_unix\_nano</td>
    </tr>

    <tr>
      <td>inputs</td>
      <td>input.value</td>
    </tr>

    <tr>
      <td>outputs</td>
      <td>output.value</td>
    </tr>

    <tr>
      <td>metadata</td>
      <td>metadata</td>
    </tr>
  </tbody>
</table>

**Generate Name Trace Info**

* conversation\_id - Conversation ID
* inputs - Input data
* outputs - Generated conversation name
* start\_time - Start time
* end\_time - End time
* tenant\_id - Tenant ID
* Metadata
  * conversation\_id - Conversation ID
  * tenant\_id - Tenant ID


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.