Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions en/self-host/use-dify/monitor/integrations/integrate-aliyun.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Integrate with Alibaba Cloud Monitor
sidebarTitle: Alibaba Cloud Monitor
description: Send traces and metrics from Dify applications to Alibaba Cloud Monitor (ARMS) via OpenTelemetry
description: Send traces from Dify applications to Alibaba Cloud Monitor (ARMS) via OpenTelemetry
---

## What is Alibaba Cloud Monitor
Expand All @@ -20,7 +20,7 @@ Alibaba Cloud provides a fully managed, maintenance-free observability platform

1. Log in to the [ARMS console](https://account.alibabacloud.com/login/login.htm?spm=5176.12901015-2.0.0.68d74b84XRatpU), and click **Integration Center** in the left navigation bar.
2. In the **Server-side Applications** area, click the **OpenTelemetry** card.
3. In the **OpenTelemetry** panel that appears, select **gRPC** as the export protocol, and select the connection method and region according to your actual deployment.
3. In the **OpenTelemetry** panel that appears, select **HTTP** as the export protocol, and select the connection method and region according to your actual deployment.

<Frame>
![Get Alibaba Cloud Access Point](https://dify-public-resources.oss-cn-hangzhou.aliyuncs.com/dify-doc/get_endpoint.png)
Expand All @@ -29,7 +29,7 @@ Alibaba Cloud provides a fully managed, maintenance-free observability platform
4. Save the **Public Endpoint** and **Authentication Token (License Key)**.

<Note>
The Endpoint does not include a port number, for example `http://tracing-cn-heyuan.arms.aliyun.com`.
Use the HTTP(S) base URL as **Endpoint**, keeping the port if the HTTP collector requires one. Enter the token separately as **License Key**. Do not include `adapt_<key>` or the ingestion path, and do not use the gRPC port `8090`; Dify constructs the OTLP/HTTP ingestion URL.
</Note>

### 2. Configure Cloud Monitor in Dify
Expand Down Expand Up @@ -72,8 +72,18 @@ Cloud Monitor provides multi-language non-invasive agents that support accessing
| Worker | OpenTelemetry Agent | [Submit Python Application Data via OpenTelemetry](https://www.alibabacloud.com/help/en/opentelemetry/user-guide/use-managed-service-for-opentelemetry-to-submit-the-trace-data-of-python-applications?spm=a2c63.p38356.help-menu-90275.d_2_0_5_0.18ee53a4EGoGuS) |
| Plugin-Daemon | LoongSuite-Go Agent | [loongsuite-go-agent](https://github.com/alibaba/loongsuite-go-agent/blob/main/README.md) |

<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 Agent apps and workflows using the [new Agent node](/en/self-host/use-dify/nodes/agent#new-agent), enable both `OPS_AGENT_TRACE_ENABLED=true` and `DIFY_AGENT_APPLICATION_TRACING_ENABLED=true` in your deployment. See [Environment Variables](/en/self-host/deploy/configuration/environments#llmops-trace-delivery). **Capture content** is off by default for these apps and controls inputs and outputs across the whole workflow. Other apps can still send inputs and outputs.
</Note>

## Monitoring Data List

Dify exports a hierarchy of operations: a message contains an `llm` call, and a Chatflow message contains its workflow and node operations. Native token usage is reported on model calls only.

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.

Cloud Monitor supports collecting data from Dify's Workflow/Chatflow/Chat/Agent applications, including execution details of workflows and workflow nodes, covering model calls, tool calls, knowledge retrieval, execution details of various process nodes, as well as metadata such as conversations and user information.

### Workflow/Chatflow Trace Information
Expand Down Expand Up @@ -193,7 +203,7 @@ Cloud Monitor supports collecting data from Dify's Workflow/Chatflow/Chat/Agent
<td>Message data</td>
</tr>
<tr>
<td>user\_session\_id</td>
<td>end\_user\_session\_id</td>
<td>User's session\_id</td>
</tr>
<tr>
Expand Down Expand Up @@ -236,10 +246,6 @@ Cloud Monitor supports collecting data from Dify's Workflow/Chatflow/Chat/Agent
<td>end\_time</td>
<td>End time</td>
</tr>
<tr>
<td>message\_file\_data</td>
<td>File data associated with the message</td>
</tr>
<tr>
<td>conversation\_mode</td>
<td>Conversation mode</td>
Expand Down
Loading
Loading