mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
add Alibaba Cloud monitoring integration doc en (#604)
* add aliyun monitor doc en Change-Id: I9f3758c13c6694c764ad356a0a5a02de7e9acc3f * fix title Change-Id: Ic464ab29ae7db00db4741d3d1f824ab87989223d * Post-review fixes * add zh and jp docs --------- Co-authored-by: Riskey <riskey47@dify.ai>
This commit is contained in:
39
docs.json
39
docs.json
@@ -130,10 +130,11 @@
|
||||
"pages": [
|
||||
"en/use-dify/monitor/integrations/integrate-langsmith",
|
||||
"en/use-dify/monitor/integrations/integrate-langfuse",
|
||||
"en/use-dify/monitor/integrations/integrate-arize",
|
||||
"en/use-dify/monitor/integrations/integrate-opik",
|
||||
"en/use-dify/monitor/integrations/integrate-weave",
|
||||
"en/use-dify/monitor/integrations/integrate-arize",
|
||||
"en/use-dify/monitor/integrations/integrate-phoenix",
|
||||
"en/use-dify/monitor/integrations/integrate-weave"
|
||||
"en/use-dify/monitor/integrations/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -504,10 +505,11 @@
|
||||
"pages": [
|
||||
"zh/use-dify/monitor/integrations/integrate-langsmith",
|
||||
"zh/use-dify/monitor/integrations/integrate-langfuse",
|
||||
"zh/use-dify/monitor/integrations/integrate-arize",
|
||||
"zh/use-dify/monitor/integrations/integrate-opik",
|
||||
"zh/use-dify/monitor/integrations/integrate-weave",
|
||||
"zh/use-dify/monitor/integrations/integrate-arize",
|
||||
"zh/use-dify/monitor/integrations/integrate-phoenix",
|
||||
"zh/use-dify/monitor/integrations/integrate-weave"
|
||||
"zh/use-dify/monitor/integrations/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -877,10 +879,11 @@
|
||||
"pages": [
|
||||
"ja/use-dify/monitor/integrations/integrate-langsmith",
|
||||
"ja/use-dify/monitor/integrations/integrate-langfuse",
|
||||
"ja/use-dify/monitor/integrations/integrate-arize",
|
||||
"ja/use-dify/monitor/integrations/integrate-opik",
|
||||
"ja/use-dify/monitor/integrations/integrate-weave",
|
||||
"ja/use-dify/monitor/integrations/integrate-arize",
|
||||
"ja/use-dify/monitor/integrations/integrate-phoenix",
|
||||
"ja/use-dify/monitor/integrations/integrate-weave"
|
||||
"ja/use-dify/monitor/integrations/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1352,7 +1355,8 @@
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-langfuse",
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith",
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-opik",
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-weave"
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-weave",
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-aliyun"
|
||||
]
|
||||
},
|
||||
"versions/3-0-x/zh/user-guide/monitoring/analysis"
|
||||
@@ -1546,7 +1550,8 @@
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-langfuse",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-opik",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-weave"
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-weave",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1704,7 +1709,8 @@
|
||||
"group": "外部Opsツールの統合",
|
||||
"pages": [
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langfuse",
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith"
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith",
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1914,7 +1920,8 @@
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-langfuse",
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith",
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-opik",
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-weave"
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-weave",
|
||||
"versions/3-0-x/zh/user-guide/monitoring/integrate-external-ops-tools/integrate-aliyun"
|
||||
]
|
||||
},
|
||||
"versions/3-0-x/zh/user-guide/monitoring/analysis"
|
||||
@@ -2102,7 +2109,8 @@
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-langfuse",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-opik",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-weave"
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-weave",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2254,7 +2262,8 @@
|
||||
"group": "外部Opsツールの統合",
|
||||
"pages": [
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langfuse",
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith"
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith",
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2647,7 +2656,8 @@
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-langfuse",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-opik",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-weave"
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-weave",
|
||||
"versions/3-0-x/en/user-guide/monitoring/integrate-external-ops-tools/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2797,7 +2807,8 @@
|
||||
"group": "外部Opsツールの統合",
|
||||
"pages": [
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langfuse",
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith"
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-langsmith",
|
||||
"versions/legacy/ja/user-guide/monitoring/integrate-external-ops-tools/integrate-aliyun"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
396
en/use-dify/monitor/integrations/integrate-aliyun.mdx
Normal file
396
en/use-dify/monitor/integrations/integrate-aliyun.mdx
Normal file
@@ -0,0 +1,396 @@
|
||||
---
|
||||
title: Integrate with Alibaba Cloud Monitor
|
||||
sidebarTitle: Alibaba Cloud Monitor
|
||||
---
|
||||
|
||||
## What is Alibaba Cloud Monitor
|
||||
|
||||
Alibaba Cloud provides a fully managed, maintenance-free observability platform that enables one-click monitoring, tracing, and evaluation of Dify applications.
|
||||
|
||||
<Info>
|
||||
Alibaba Cloud Monitor natively supports Python/Golang/Java applications through [LoongSuite](https://github.com/alibaba/loongsuite-python-agent) agents and open-source OpenTelemetry agents. In addition to one-click monitoring of Dify LLM applications, it also supports end-to-end observability of Dify components and their upstream and downstream dependencies through non-invasive agents.
|
||||
|
||||
For more details, please refer to the [Cloud Monitor documentation](https://www.alibabacloud.com/help/en/cms/cloudmonitor-1-0/product-overview/what-is-cloudmonitor?spm=a3c0i.63551.2277339270.1.76c7112eeKEvSr).
|
||||
</Info>
|
||||
|
||||
***
|
||||
|
||||
## How to Configure Alibaba Cloud Monitor
|
||||
|
||||
### 1. Get Alibaba Cloud Endpoint and License Key
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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`.
|
||||
</Note>
|
||||
|
||||
### 2. Configure Cloud Monitor in Dify
|
||||
|
||||
<Info>
|
||||
**Prerequisites**: Dify Cloud or Community Edition version must be ≥ v1.6.0
|
||||
</Info>
|
||||
|
||||
1. Log in to the Dify console and navigate to the application you want to monitor.
|
||||
2. Open **Monitoring** in the left navigation bar.
|
||||
3. Click **Tracing app performance**, then click **Configure** in the **Cloud Monitor** area.
|
||||
|
||||

|
||||
|
||||
4. In the dialog that appears, enter the **License Key** and **Endpoint** obtained in step 1, and customize the **App Name** (the application name displayed in the ARMS console), then click **Save & Enable**.
|
||||
|
||||
***
|
||||
|
||||
## View Monitoring Data in Alibaba Cloud Monitor
|
||||
|
||||
After configuration, debug or production data from applications in Dify can be monitored in Cloud Monitor.
|
||||
|
||||
### Method 1: Jump to ARMS Console from Dify Application
|
||||
|
||||
In the Dify console, select an application with tracing enabled, go to **Tracing Configuration**, and click **View** in the **Cloud Monitor** area.
|
||||
|
||||
### Method 2: View Directly in ARMS Console
|
||||
|
||||
Go to the corresponding Dify application in the **LLM Application Monitoring > Application List** page of the ARMS console.
|
||||
|
||||
***
|
||||
|
||||
## Access More Data
|
||||
|
||||
Cloud Monitor provides multi-language non-invasive agents that support accessing various components of the Dify cluster to achieve end-to-end tracing.
|
||||
|
||||
| Dify Component | Agent | Details |
|
||||
|----------------|-------|---------|
|
||||
| Nginx | OpenTelemetry Agent | [Use OpenTelemetry for Nginx Tracing](https://www.alibabacloud.com/help/en/opentelemetry/user-guide/use-opentelemetry-to-perform-tracing-analysis-on-nginx?spm=a2c63.l28256.help-menu-search-90275.d_1) |
|
||||
| API | LoongSuite-Python Agent | [loongsuite-python-agent](https://github.com/alibaba/loongsuite-python-agent/blob/main/README.md) |
|
||||
| Sandbox | LoongSuite-Go Agent | [loongsuite-go-agent](https://github.com/alibaba/loongsuite-go-agent/blob/main/README.md) |
|
||||
| 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) |
|
||||
|
||||
***
|
||||
|
||||
## Monitoring Data List
|
||||
|
||||
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
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Workflow</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>workflow\_id</td>
|
||||
<td>Unique identifier of the Workflow</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_id</td>
|
||||
<td>Conversation ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_id</td>
|
||||
<td>ID of this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tenant\_id</td>
|
||||
<td>Tenant ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>elapsed\_time</td>
|
||||
<td>Duration of this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>status</td>
|
||||
<td>Run status</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>version</td>
|
||||
<td>Workflow version</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>total\_tokens</td>
|
||||
<td>Total tokens used in this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_list</td>
|
||||
<td>List of processed files</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>triggered\_from</td>
|
||||
<td>Source that triggered this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_inputs</td>
|
||||
<td>Input data for this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_outputs</td>
|
||||
<td>Output data for this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>Errors that occurred during this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>query</td>
|
||||
<td>Query used during runtime</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_app\_log\_id</td>
|
||||
<td>Workflow application log ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>Associated message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>Run start time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>Run end time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Workflow Trace Metadata**
|
||||
|
||||
* workflow\_id - Unique identifier of the Workflow
|
||||
* conversation\_id - Conversation ID
|
||||
* workflow\_run\_id - ID of this run
|
||||
* tenant\_id - Tenant ID
|
||||
* elapsed\_time - Duration of this run
|
||||
* status - Run status
|
||||
* version - Workflow version
|
||||
* total\_tokens - Total tokens used in this run
|
||||
* file\_list - List of processed files
|
||||
* triggered\_from - Trigger source
|
||||
|
||||
### Message Trace Information
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Message</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>Message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>Message data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user\_session\_id</td>
|
||||
<td>User's session\_id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_model</td>
|
||||
<td>Conversation model</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_tokens</td>
|
||||
<td>Number of tokens in the message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>answer\_tokens</td>
|
||||
<td>Number of tokens in the answer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>total\_tokens</td>
|
||||
<td>Total tokens in message and answer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>Error information</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>Input data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>outputs</td>
|
||||
<td>Output data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_list</td>
|
||||
<td>List of processed files</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>Start time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Message Trace Metadata**
|
||||
|
||||
* conversation\_id - ID of the conversation to which the message belongs
|
||||
* 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 it is agent-based
|
||||
* workflow\_run\_id - Workflow run ID
|
||||
* from\_source - Message source
|
||||
* message\_id - Message ID
|
||||
|
||||
### Dataset Retrieval Trace Information
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dataset Retrieval</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>Message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>Input content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>documents</td>
|
||||
<td>Document data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>Start time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>End time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>Message data</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Dataset Retrieval Trace 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 it is agent-based
|
||||
* workflow\_run\_id - Workflow run ID
|
||||
* from\_source - Message source
|
||||
|
||||
### Tool Trace Information
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tool</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>Message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_name</td>
|
||||
<td>Tool name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>Start time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>End time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_inputs</td>
|
||||
<td>Tool inputs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_outputs</td>
|
||||
<td>Tool outputs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>Message data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>Error information (if any)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>Input content of the message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>outputs</td>
|
||||
<td>Answer content of the message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_config</td>
|
||||
<td>Tool configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>time\_cost</td>
|
||||
<td>Time cost</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_parameters</td>
|
||||
<td>Tool parameters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_url</td>
|
||||
<td>URL of associated file</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Tool Trace 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
|
||||
* tool\_parameters - Tool parameters
|
||||
* message\_file\_id - Message file ID
|
||||
* created\_by\_role - Creator role
|
||||
* created\_user\_id - Creator user ID
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Arize
|
||||
title: Integrate with Arize
|
||||
sidebarTitle: Arize
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Langfuse
|
||||
title: Integrate with Langfuse
|
||||
sidebarTitle: Langfuse
|
||||
---
|
||||
|
||||
### What is Langfuse
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: LangSmith
|
||||
title: Integrate with LangSmith
|
||||
sidebarTitle: LangSmith
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Opik
|
||||
title: Integrate with Opik
|
||||
sidebarTitle: Opik
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Phoenix
|
||||
title: Integrate with Phoenix
|
||||
sidebarTitle: Phoenix
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: W&B Weave
|
||||
title: Integrate with W&B Weave
|
||||
sidebarTitle: W&B Weave
|
||||
description: Dify Cloud | Community version ≥ v1.3.1
|
||||
---
|
||||
|
||||
|
||||
395
ja/use-dify/monitor/integrations/integrate-aliyun.mdx
Normal file
395
ja/use-dify/monitor/integrations/integrate-aliyun.mdx
Normal file
@@ -0,0 +1,395 @@
|
||||
---
|
||||
title: Alibaba Cloud Monitorの統合
|
||||
---
|
||||
|
||||
## Alibaba Cloud Monitorとは
|
||||
|
||||
Alibaba Cloudは、Difyアプリケーションのワンクリック監視、トレース、評価を可能にする、フルマネージドかつメンテナンス不要のオブザーバビリティプラットフォームを提供します。
|
||||
|
||||
<Info>
|
||||
Alibaba Cloud Monitorは、[LoongSuite](https://github.com/alibaba/loongsuite-python-agent)エージェントやオープンソースのOpenTelemetryエージェントを通じて、Python/Golang/Javaアプリケーションをネイティブにサポートします。Dify LLMアプリケーションのワンクリック監視に加え、非侵入型エージェントによるDifyコンポーネントおよびその上下流依存関係のエンドツーエンドの可観測性もサポートします。
|
||||
|
||||
詳細は[Cloud Monitorドキュメント](https://www.alibabacloud.com/help/en/cms/cloudmonitor-1-0/product-overview/what-is-cloudmonitor?spm=a3c0i.63551.2277339270.1.76c7112eeKEvSr)をご参照ください。
|
||||
</Info>
|
||||
|
||||
***
|
||||
|
||||
## Alibaba Cloud Monitorの設定方法
|
||||
|
||||
### 1. Alibaba Cloudのエンドポイントとライセンスキーの取得
|
||||
|
||||
1. [ARMSコンソール](https://account.alibabacloud.com/login/login.htm?spm=5176.12901015-2.0.0.68d74b84XRatpU)にログインし、左側のナビゲーションバーで**Integration Center**をクリックします。
|
||||
2. **Server-side Applications**エリアで**OpenTelemetry**カードをクリックします。
|
||||
3. 表示された**OpenTelemetry**パネルで、エクスポートプロトコルとして**gRPC**を選択し、実際のデプロイに応じて接続方法とリージョンを選択します。
|
||||
|
||||

|
||||
|
||||
4. **Public Endpoint**と**Authentication Token (License Key)**を保存します。
|
||||
|
||||
<Note>
|
||||
エンドポイントにはポート番号が含まれていません(例: `http://tracing-cn-heyuan.arms.aliyun.com`)。
|
||||
</Note>
|
||||
|
||||
### 2. DifyでCloud Monitorを設定
|
||||
|
||||
<Info>
|
||||
**前提条件**: Dify CloudまたはCommunity Editionのバージョンがv1.6.0以上である必要があります。
|
||||
</Info>
|
||||
|
||||
1. Difyコンソールにログインし、監視したいアプリケーションに移動します。
|
||||
2. 左側のナビゲーションバーで**Monitoring**を開きます。
|
||||
3. **Tracing app performance**をクリックし、**Cloud Monitor**エリアで**Configure**をクリックします。
|
||||
|
||||

|
||||
|
||||
4. 表示されたダイアログで、手順1で取得した**License Key**と**Endpoint**を入力し、**App Name**(ARMSコンソールに表示されるアプリケーション名)をカスタマイズして**Save & Enable**をクリックします。
|
||||
|
||||
***
|
||||
|
||||
## Alibaba Cloud Monitorでの監視データの表示
|
||||
|
||||
設定後、Difyのアプリケーションからのデバッグまたは本番データはCloud Monitorで監視できます。
|
||||
|
||||
### 方法1: DifyアプリケーションからARMSコンソールにジャンプ
|
||||
|
||||
Difyコンソールでトレースが有効になっているアプリケーションを選択し、**Tracing Configuration**に移動して、**Cloud Monitor**エリアの**View**をクリックします。
|
||||
|
||||
### 方法2: ARMSコンソールで直接表示
|
||||
|
||||
ARMSコンソールの**LLM Application Monitoring > Application List**ページで、対応するDifyアプリケーションに移動します。
|
||||
|
||||
***
|
||||
|
||||
## より多くのデータにアクセス
|
||||
|
||||
Cloud Monitorは、Difyクラスターのさまざまなコンポーネントにアクセスしてエンドツーエンドのトレースを実現するマルチランゲージの非侵入型エージェントを提供します。
|
||||
|
||||
| Difyコンポーネント | エージェント | 詳細 |
|
||||
|----------------|-------|---------|
|
||||
| Nginx | OpenTelemetry Agent | [NginxトレースにOpenTelemetryを使用](https://www.alibabacloud.com/help/en/opentelemetry/user-guide/use-opentelemetry-to-perform-tracing-analysis-on-nginx?spm=a2c63.l28256.help-menu-search-90275.d_1) |
|
||||
| API | LoongSuite-Python Agent | [loongsuite-python-agent](https://github.com/alibaba/loongsuite-python-agent/blob/main/README.md) |
|
||||
| Sandbox | LoongSuite-Go Agent | [loongsuite-go-agent](https://github.com/alibaba/loongsuite-go-agent/blob/main/README.md) |
|
||||
| Worker | OpenTelemetry Agent | [OpenTelemetryを介してPythonアプリケーションデータを送信](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) |
|
||||
|
||||
***
|
||||
|
||||
## 監視データリスト
|
||||
|
||||
Cloud Monitorは、DifyのWorkflow/Chatflow/Chat/Agentアプリケーションからデータを収集することをサポートしており、ワークフローおよびワークフローノードの実行詳細、モデル呼び出し、ツール呼び出し、知識取得、さまざまなプロセスノードの実行詳細、会話やユーザー情報などのメタデータをカバーしています。
|
||||
|
||||
### ワークフロー/Chatflowトレース情報
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Workflow</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>workflow\_id</td>
|
||||
<td>ワークフローの一意の識別子</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_id</td>
|
||||
<td>会話ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_id</td>
|
||||
<td>この実行のID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tenant\_id</td>
|
||||
<td>テナントID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>elapsed\_time</td>
|
||||
<td>この実行の所要時間</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>status</td>
|
||||
<td>実行ステータス</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>version</td>
|
||||
<td>ワークフローのバージョン</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>total\_tokens</td>
|
||||
<td>この実行で使用されたトークンの総数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_list</td>
|
||||
<td>処理されたファイルのリスト</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>triggered\_from</td>
|
||||
<td>この実行をトリガーしたソース</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_inputs</td>
|
||||
<td>この実行の入力データ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_outputs</td>
|
||||
<td>この実行の出力データ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>この実行中に発生したエラー</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>query</td>
|
||||
<td>実行時に使用されたクエリ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_app\_log\_id</td>
|
||||
<td>ワークフローアプリケーションログID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>関連するメッセージID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>実行開始時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>実行終了時刻</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**ワークフロートレースメタデータ**
|
||||
|
||||
* workflow\_id - ワークフローの一意の識別子
|
||||
* conversation\_id - 会話ID
|
||||
* workflow\_run\_id - この実行のID
|
||||
* tenant\_id - テナントID
|
||||
* elapsed\_time - この実行の所要時間
|
||||
* status - 実行ステータス
|
||||
* version - ワークフローのバージョン
|
||||
* total\_tokens - この実行で使用されたトークンの総数
|
||||
* file\_list - 処理されたファイルのリスト
|
||||
* triggered\_from - トリガーソース
|
||||
|
||||
### メッセージトレース情報
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Message</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>メッセージID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>メッセージデータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user\_session\_id</td>
|
||||
<td>ユーザーのsession\_id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_model</td>
|
||||
<td>会話モデル</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_tokens</td>
|
||||
<td>メッセージ内のトークン数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>answer\_tokens</td>
|
||||
<td>回答内のトークン数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>total\_tokens</td>
|
||||
<td>メッセージと回答のトークンの総数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>エラー情報</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>入力データ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>outputs</td>
|
||||
<td>出力データ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_list</td>
|
||||
<td>処理されたファイルのリスト</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>開始時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>終了時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_file\_data</td>
|
||||
<td>メッセージに関連するファイルデータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_mode</td>
|
||||
<td>会話モード</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**メッセージトレースメタデータ**
|
||||
|
||||
* conversation\_id - メッセージが属する会話のID
|
||||
* ls\_provider - モデルプロバイダー
|
||||
* ls\_model\_name - モデルID
|
||||
* status - メッセージステータス
|
||||
* from\_end\_user\_id - 送信ユーザーのID
|
||||
* from\_account\_id - 送信アカウントのID
|
||||
* agent\_based - エージェントベースかどうか
|
||||
* workflow\_run\_id - ワークフロー実行ID
|
||||
* from\_source - メッセージソース
|
||||
* message\_id - メッセージID
|
||||
|
||||
### データセット取得トレース情報
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dataset Retrieval</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>メッセージID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>入力コンテンツ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>documents</td>
|
||||
<td>ドキュメントデータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>開始時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>終了時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>メッセージデータ</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**データセット取得トレースメタデータ**
|
||||
|
||||
* message\_id - メッセージID
|
||||
* ls\_provider - モデルプロバイダー
|
||||
* ls\_model\_name - モデルID
|
||||
* status - メッセージステータス
|
||||
* from\_end\_user\_id - 送信ユーザーのID
|
||||
* from\_account\_id - 送信アカウントのID
|
||||
* agent\_based - エージェントベースかどうか
|
||||
* workflow\_run\_id - ワークフロー実行ID
|
||||
* from\_source - メッセージソース
|
||||
|
||||
### ツールトレース情報
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tool</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>メッセージID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_name</td>
|
||||
<td>ツール名</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>開始時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>終了時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_inputs</td>
|
||||
<td>ツール入力</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_outputs</td>
|
||||
<td>ツール出力</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>メッセージデータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>エラー情報(該当する場合)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>メッセージの入力コンテンツ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>outputs</td>
|
||||
<td>メッセージの回答コンテンツ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_config</td>
|
||||
<td>ツール設定</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>time\_cost</td>
|
||||
<td>コスト時間</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_parameters</td>
|
||||
<td>ツールパラメータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_url</td>
|
||||
<td>関連ファイルのURL</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**ツールトレースメタデータ**
|
||||
|
||||
* message\_id - メッセージID
|
||||
* tool\_name - ツール名
|
||||
* tool\_inputs - ツール入力
|
||||
* tool\_outputs - ツール出力
|
||||
* tool\_config - ツール設定
|
||||
* time\_cost - コスト時間
|
||||
* error - エラー情報
|
||||
* tool\_parameters - ツールパラメータ
|
||||
* message\_file\_id - メッセージファイルID
|
||||
* created\_by\_role - 作成者の役割
|
||||
* created\_user\_id - 作成者のユーザーID
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Integrate External Ops Tools
|
||||
title: Integrate with External Ops Tools
|
||||
sidebarTitle: Overview
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
---
|
||||
title: Integrate with Alibaba Cloud Monitor
|
||||
sidebarTitle: Alibaba Cloud Monitor
|
||||
---
|
||||
|
||||
## What is Alibaba Cloud Monitor
|
||||
|
||||
Alibaba Cloud provides a fully managed, maintenance-free observability platform that enables one-click monitoring, tracing, and evaluation of Dify applications.
|
||||
|
||||
<Info>
|
||||
Alibaba Cloud Monitor natively supports Python/Golang/Java applications through [LoongSuite](https://github.com/alibaba/loongsuite-python-agent) agents and open-source OpenTelemetry agents. In addition to one-click monitoring of Dify LLM applications, it also supports end-to-end observability of Dify components and their upstream and downstream dependencies through non-invasive agents.
|
||||
|
||||
For more details, please refer to the [Cloud Monitor documentation](https://www.alibabacloud.com/help/en/cms/cloudmonitor-1-0/product-overview/what-is-cloudmonitor?spm=a3c0i.63551.2277339270.1.76c7112eeKEvSr).
|
||||
</Info>
|
||||
|
||||
***
|
||||
|
||||
## How to Configure Alibaba Cloud Monitor
|
||||
|
||||
### 1. Get Alibaba Cloud Endpoint and License Key
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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`.
|
||||
</Note>
|
||||
|
||||
### 2. Configure Cloud Monitor in Dify
|
||||
|
||||
<Info>
|
||||
**Prerequisites**: Dify Cloud or Community Edition version must be ≥ v1.6.0
|
||||
</Info>
|
||||
|
||||
1. Log in to the Dify console and navigate to the application you want to monitor.
|
||||
2. Open **Monitoring** in the left navigation bar.
|
||||
3. Click **Tracing app performance**, then click **Configure** in the **Cloud Monitor** area.
|
||||
|
||||

|
||||
|
||||
4. In the dialog that appears, enter the **License Key** and **Endpoint** obtained in step 1, and customize the **App Name** (the application name displayed in the ARMS console), then click **Save & Enable**.
|
||||
|
||||
***
|
||||
|
||||
## View Monitoring Data in Alibaba Cloud Monitor
|
||||
|
||||
After configuration, debug or production data from applications in Dify can be monitored in Cloud Monitor.
|
||||
|
||||
### Method 1: Jump to ARMS Console from Dify Application
|
||||
|
||||
In the Dify console, select an application with tracing enabled, go to **Tracing Configuration**, and click **View** in the **Cloud Monitor** area.
|
||||
|
||||
### Method 2: View Directly in ARMS Console
|
||||
|
||||
Go to the corresponding Dify application in the **LLM Application Monitoring > Application List** page of the ARMS console.
|
||||
|
||||
***
|
||||
|
||||
## Access More Data
|
||||
|
||||
Cloud Monitor provides multi-language non-invasive agents that support accessing various components of the Dify cluster to achieve end-to-end tracing.
|
||||
|
||||
| Dify Component | Agent | Details |
|
||||
|----------------|-------|---------|
|
||||
| Nginx | OpenTelemetry Agent | [Use OpenTelemetry for Nginx Tracing](https://www.alibabacloud.com/help/en/opentelemetry/user-guide/use-opentelemetry-to-perform-tracing-analysis-on-nginx?spm=a2c63.l28256.help-menu-search-90275.d_1) |
|
||||
| API | LoongSuite-Python Agent | [loongsuite-python-agent](https://github.com/alibaba/loongsuite-python-agent/blob/main/README.md) |
|
||||
| Sandbox | LoongSuite-Go Agent | [loongsuite-go-agent](https://github.com/alibaba/loongsuite-go-agent/blob/main/README.md) |
|
||||
| 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) |
|
||||
|
||||
***
|
||||
|
||||
## Monitoring Data List
|
||||
|
||||
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
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Workflow</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>workflow\_id</td>
|
||||
<td>Unique identifier of the Workflow</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_id</td>
|
||||
<td>Conversation ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_id</td>
|
||||
<td>ID of this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tenant\_id</td>
|
||||
<td>Tenant ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>elapsed\_time</td>
|
||||
<td>Duration of this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>status</td>
|
||||
<td>Run status</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>version</td>
|
||||
<td>Workflow version</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>total\_tokens</td>
|
||||
<td>Total tokens used in this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_list</td>
|
||||
<td>List of processed files</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>triggered\_from</td>
|
||||
<td>Source that triggered this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_inputs</td>
|
||||
<td>Input data for this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_outputs</td>
|
||||
<td>Output data for this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>Errors that occurred during this run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>query</td>
|
||||
<td>Query used during runtime</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_app\_log\_id</td>
|
||||
<td>Workflow application log ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>Associated message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>Run start time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>Run end time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Workflow Trace Metadata**
|
||||
|
||||
* workflow\_id - Unique identifier of the Workflow
|
||||
* conversation\_id - Conversation ID
|
||||
* workflow\_run\_id - ID of this run
|
||||
* tenant\_id - Tenant ID
|
||||
* elapsed\_time - Duration of this run
|
||||
* status - Run status
|
||||
* version - Workflow version
|
||||
* total\_tokens - Total tokens used in this run
|
||||
* file\_list - List of processed files
|
||||
* triggered\_from - Trigger source
|
||||
|
||||
### Message Trace Information
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Message</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>Message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>Message data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user\_session\_id</td>
|
||||
<td>User's session\_id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_model</td>
|
||||
<td>Conversation model</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_tokens</td>
|
||||
<td>Number of tokens in the message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>answer\_tokens</td>
|
||||
<td>Number of tokens in the answer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>total\_tokens</td>
|
||||
<td>Total tokens in message and answer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>Error information</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>Input data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>outputs</td>
|
||||
<td>Output data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_list</td>
|
||||
<td>List of processed files</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>Start time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Message Trace Metadata**
|
||||
|
||||
* conversation\_id - ID of the conversation to which the message belongs
|
||||
* 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 it is agent-based
|
||||
* workflow\_run\_id - Workflow run ID
|
||||
* from\_source - Message source
|
||||
* message\_id - Message ID
|
||||
|
||||
### Dataset Retrieval Trace Information
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dataset Retrieval</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>Message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>Input content</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>documents</td>
|
||||
<td>Document data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>Start time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>End time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>Message data</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Dataset Retrieval Trace 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 it is agent-based
|
||||
* workflow\_run\_id - Workflow run ID
|
||||
* from\_source - Message source
|
||||
|
||||
### Tool Trace Information
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tool</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>Message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_name</td>
|
||||
<td>Tool name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>Start time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>End time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_inputs</td>
|
||||
<td>Tool inputs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_outputs</td>
|
||||
<td>Tool outputs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>Message data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>Error information (if any)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>Input content of the message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>outputs</td>
|
||||
<td>Answer content of the message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_config</td>
|
||||
<td>Tool configuration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>time\_cost</td>
|
||||
<td>Time cost</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_parameters</td>
|
||||
<td>Tool parameters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_url</td>
|
||||
<td>URL of associated file</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**Tool Trace 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
|
||||
* tool\_parameters - Tool parameters
|
||||
* message\_file\_id - Message file ID
|
||||
* created\_by\_role - Creator role
|
||||
* created\_user\_id - Creator user ID
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Integrate Langfuse
|
||||
title: Integrate with Langfuse
|
||||
sidebarTitle: Langfuse
|
||||
---
|
||||
|
||||
### What is Langfuse
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Integrate LangSmith
|
||||
title: Integrate with LangSmith
|
||||
sidebarTitle: LangSmith
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: Integrate Opik
|
||||
title: Integrate with Opik
|
||||
sidebarTitle: Opik
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
---
|
||||
title: Integrate W&B Weave
|
||||
title: Integrate with W&B Weave
|
||||
sidebarTitle: W&B Weave
|
||||
description: Dify Cloud | Community version ≥ v1.3.1
|
||||
---
|
||||
|
||||
### What is W&b Weave
|
||||
### What is W&B Weave
|
||||
|
||||
Weights & Biases (W&B) Weave is a framework for tracking, experimenting with, evaluating, deploying, and improving LLM-based applications. Designed for flexibility and scalability, Weave supports every stage of your LLM application development workflow.
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
title: 集成 阿里云 云监控
|
||||
title: 集成阿里云云监控
|
||||
---
|
||||
|
||||
## 什么是 阿里云云监控
|
||||
## 什么是阿里云云监控
|
||||
|
||||
阿里云提供的全托管免运维可观测平台,一键开启 Dify 应用的监控追踪和评估。
|
||||
|
||||
<Info>
|
||||
阿里云云监控原生支持 Python/Golang/Java 应用通过 [LoongSuite](https://github.com/alibaba/loongsuite-python-agent)
|
||||
探针 & 开源 OpenTelemetry 探针接入,在一键开启 Dify 大模型应用监控外,还支持通过无侵入探针对 Dify 组件及其上下游依赖的全链路可观测。
|
||||
更多详情,请参考 [云监控](https://help.aliyun.com/zh/cms/cloudmonitor-2-0/user-guide/model-application)。
|
||||
更多详情,请参考 [阿里云官方文档](https://help.aliyun.com/zh/cms/cloudmonitor-2-0/user-guide/model-application)。
|
||||
</Info>
|
||||
|
||||
## 如何配置 云监控
|
||||
## 如何配置云监控
|
||||
|
||||
### 1. 获取阿里云 Endpoint 和 License Key
|
||||
|
||||
@@ -26,7 +26,7 @@ title: 集成 阿里云 云监控
|
||||
> **说明**
|
||||
> Endpoint 不带端口号,例如 `http://tracing-cn-heyuan.arms.aliyuncs.com`。
|
||||
|
||||
### 2. 将 云监控 与 Dify 集成
|
||||
### 2. 将云监控与 Dify 集成
|
||||
|
||||
> **📌 前提条件**
|
||||
> Dify Cloud | 社区版本号需 ≥ v1.6.0
|
||||
@@ -39,9 +39,7 @@ title: 集成 阿里云 云监控
|
||||
|
||||
4. 在弹出的对话框中输入步骤 1 获取的 **License Key** 和 **Endpoint**,并自定义 **App Name**(ARMS 控制台显示的应用名称),然后单击 **保存并启用**。
|
||||
|
||||
|
||||
|
||||
## 在 云监控 中查看监控数据
|
||||
## 在云监控中查看监控数据
|
||||
|
||||
配置完成后,Dify 内应用的调试或生产数据可以在 **云监控** 中进行监控。
|
||||
|
||||
|
||||
@@ -0,0 +1,395 @@
|
||||
---
|
||||
title: Alibaba Cloud Monitorとの統合
|
||||
---
|
||||
|
||||
## Alibaba Cloud Monitorとは
|
||||
|
||||
Alibaba Cloudは、Difyアプリケーションのワンクリック監視、トレース、評価を可能にする、フルマネージドかつメンテナンス不要のオブザーバビリティプラットフォームを提供します。
|
||||
|
||||
<Info>
|
||||
Alibaba Cloud Monitorは、[LoongSuite](https://github.com/alibaba/loongsuite-python-agent)エージェントやオープンソースのOpenTelemetryエージェントを通じて、Python/Golang/Javaアプリケーションをネイティブにサポートします。Dify LLMアプリケーションのワンクリック監視に加え、非侵入型エージェントによるDifyコンポーネントおよびその上下流依存関係のエンドツーエンドの可観測性もサポートします。
|
||||
|
||||
詳細は[Cloud Monitorドキュメント](https://www.alibabacloud.com/help/en/cms/cloudmonitor-1-0/product-overview/what-is-cloudmonitor?spm=a3c0i.63551.2277339270.1.76c7112eeKEvSr)をご参照ください。
|
||||
</Info>
|
||||
|
||||
***
|
||||
|
||||
## Alibaba Cloud Monitorの設定方法
|
||||
|
||||
### 1. Alibaba Cloudのエンドポイントとライセンスキーの取得
|
||||
|
||||
1. [ARMSコンソール](https://account.alibabacloud.com/login/login.htm?spm=5176.12901015-2.0.0.68d74b84XRatpU)にログインし、左側のナビゲーションバーで**Integration Center**をクリックします。
|
||||
2. **Server-side Applications**エリアで**OpenTelemetry**カードをクリックします。
|
||||
3. 表示された**OpenTelemetry**パネルで、エクスポートプロトコルとして**gRPC**を選択し、実際のデプロイに応じて接続方法とリージョンを選択します。
|
||||
|
||||

|
||||
|
||||
4. **Public Endpoint**と**Authentication Token (License Key)**を保存します。
|
||||
|
||||
<Note>
|
||||
エンドポイントにはポート番号が含まれていません(例: `http://tracing-cn-heyuan.arms.aliyun.com`)。
|
||||
</Note>
|
||||
|
||||
### 2. DifyでCloud Monitorを設定
|
||||
|
||||
<Info>
|
||||
**前提条件**: Dify CloudまたはCommunity Editionのバージョンがv1.6.0以上である必要があります。
|
||||
</Info>
|
||||
|
||||
1. Difyコンソールにログインし、監視したいアプリケーションに移動します。
|
||||
2. 左側のナビゲーションバーで**Monitoring**を開きます。
|
||||
3. **Tracing app performance**をクリックし、**Cloud Monitor**エリアで**Configure**をクリックします。
|
||||
|
||||

|
||||
|
||||
4. 表示されたダイアログで、手順1で取得した**License Key**と**Endpoint**を入力し、**App Name**(ARMSコンソールに表示されるアプリケーション名)をカスタマイズして**Save & Enable**をクリックします。
|
||||
|
||||
***
|
||||
|
||||
## Alibaba Cloud Monitorでの監視データの表示
|
||||
|
||||
設定後、Difyのアプリケーションからのデバッグまたは本番データはCloud Monitorで監視できます。
|
||||
|
||||
### 方法1: DifyアプリケーションからARMSコンソールにジャンプ
|
||||
|
||||
Difyコンソールでトレースが有効になっているアプリケーションを選択し、**Tracing Configuration**に移動して、**Cloud Monitor**エリアの**View**をクリックします。
|
||||
|
||||
### 方法2: ARMSコンソールで直接表示
|
||||
|
||||
ARMSコンソールの**LLM Application Monitoring > Application List**ページで、対応するDifyアプリケーションに移動します。
|
||||
|
||||
***
|
||||
|
||||
## より多くのデータにアクセス
|
||||
|
||||
Cloud Monitorは、Difyクラスターのさまざまなコンポーネントにアクセスしてエンドツーエンドのトレースを実現するマルチランゲージの非侵入型エージェントを提供します。
|
||||
|
||||
| Difyコンポーネント | エージェント | 詳細 |
|
||||
|----------------|-------|---------|
|
||||
| Nginx | OpenTelemetry Agent | [NginxトレースにOpenTelemetryを使用](https://www.alibabacloud.com/help/en/opentelemetry/user-guide/use-opentelemetry-to-perform-tracing-analysis-on-nginx?spm=a2c63.l28256.help-menu-search-90275.d_1) |
|
||||
| API | LoongSuite-Python Agent | [loongsuite-python-agent](https://github.com/alibaba/loongsuite-python-agent/blob/main/README.md) |
|
||||
| Sandbox | LoongSuite-Go Agent | [loongsuite-go-agent](https://github.com/alibaba/loongsuite-go-agent/blob/main/README.md) |
|
||||
| Worker | OpenTelemetry Agent | [OpenTelemetryを介してPythonアプリケーションデータを送信](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) |
|
||||
|
||||
***
|
||||
|
||||
## 監視データリスト
|
||||
|
||||
Cloud Monitorは、DifyのWorkflow/Chatflow/Chat/Agentアプリケーションからデータを収集することをサポートしており、ワークフローおよびワークフローノードの実行詳細、モデル呼び出し、ツール呼び出し、知識取得、さまざまなプロセスノードの実行詳細、会話やユーザー情報などのメタデータをカバーしています。
|
||||
|
||||
### ワークフロー/Chatflowトレース情報
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Workflow</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>workflow\_id</td>
|
||||
<td>ワークフローの一意の識別子</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_id</td>
|
||||
<td>会話ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_id</td>
|
||||
<td>この実行のID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tenant\_id</td>
|
||||
<td>テナントID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>elapsed\_time</td>
|
||||
<td>この実行の所要時間</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>status</td>
|
||||
<td>実行ステータス</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>version</td>
|
||||
<td>ワークフローのバージョン</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>total\_tokens</td>
|
||||
<td>この実行で使用されたトークンの総数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_list</td>
|
||||
<td>処理されたファイルのリスト</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>triggered\_from</td>
|
||||
<td>この実行をトリガーしたソース</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_inputs</td>
|
||||
<td>この実行の入力データ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_run\_outputs</td>
|
||||
<td>この実行の出力データ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>この実行中に発生したエラー</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>query</td>
|
||||
<td>実行時に使用されたクエリ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>workflow\_app\_log\_id</td>
|
||||
<td>ワークフローアプリケーションログID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>関連するメッセージID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>実行開始時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>実行終了時刻</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**ワークフロートレースメタデータ**
|
||||
|
||||
* workflow\_id - ワークフローの一意の識別子
|
||||
* conversation\_id - 会話ID
|
||||
* workflow\_run\_id - この実行のID
|
||||
* tenant\_id - テナントID
|
||||
* elapsed\_time - この実行の所要時間
|
||||
* status - 実行ステータス
|
||||
* version - ワークフローのバージョン
|
||||
* total\_tokens - この実行で使用されたトークンの総数
|
||||
* file\_list - 処理されたファイルのリスト
|
||||
* triggered\_from - トリガーソース
|
||||
|
||||
### メッセージトレース情報
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Message</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>メッセージID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>メッセージデータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user\_session\_id</td>
|
||||
<td>ユーザーのsession\_id</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_model</td>
|
||||
<td>会話モデル</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_tokens</td>
|
||||
<td>メッセージ内のトークン数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>answer\_tokens</td>
|
||||
<td>回答内のトークン数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>total\_tokens</td>
|
||||
<td>メッセージと回答のトークンの総数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>エラー情報</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>入力データ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>outputs</td>
|
||||
<td>出力データ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_list</td>
|
||||
<td>処理されたファイルのリスト</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>開始時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>終了時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_file\_data</td>
|
||||
<td>メッセージに関連するファイルデータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>conversation\_mode</td>
|
||||
<td>会話モード</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**メッセージトレースメタデータ**
|
||||
|
||||
* conversation\_id - メッセージが属する会話のID
|
||||
* ls\_provider - モデルプロバイダー
|
||||
* ls\_model\_name - モデルID
|
||||
* status - メッセージステータス
|
||||
* from\_end\_user\_id - 送信ユーザーのID
|
||||
* from\_account\_id - 送信アカウントのID
|
||||
* agent\_based - エージェントベースかどうか
|
||||
* workflow\_run\_id - ワークフロー実行ID
|
||||
* from\_source - メッセージソース
|
||||
* message\_id - メッセージID
|
||||
|
||||
### データセット取得トレース情報
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dataset Retrieval</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>メッセージID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>入力コンテンツ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>documents</td>
|
||||
<td>ドキュメントデータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>開始時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>終了時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>メッセージデータ</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**データセット取得トレースメタデータ**
|
||||
|
||||
* message\_id - メッセージID
|
||||
* ls\_provider - モデルプロバイダー
|
||||
* ls\_model\_name - モデルID
|
||||
* status - メッセージステータス
|
||||
* from\_end\_user\_id - 送信ユーザーのID
|
||||
* from\_account\_id - 送信アカウントのID
|
||||
* agent\_based - エージェントベースかどうか
|
||||
* workflow\_run\_id - ワークフロー実行ID
|
||||
* from\_source - メッセージソース
|
||||
|
||||
### ツールトレース情報
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tool</th>
|
||||
<th>Alibaba Cloud Monitor Trace</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>message\_id</td>
|
||||
<td>メッセージID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_name</td>
|
||||
<td>ツール名</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>start\_time</td>
|
||||
<td>開始時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>end\_time</td>
|
||||
<td>終了時刻</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_inputs</td>
|
||||
<td>ツール入力</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_outputs</td>
|
||||
<td>ツール出力</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message\_data</td>
|
||||
<td>メッセージデータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>error</td>
|
||||
<td>エラー情報(該当する場合)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputs</td>
|
||||
<td>メッセージの入力コンテンツ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>outputs</td>
|
||||
<td>メッセージの回答コンテンツ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_config</td>
|
||||
<td>ツール設定</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>time\_cost</td>
|
||||
<td>コスト時間</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tool\_parameters</td>
|
||||
<td>ツールパラメータ</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file\_url</td>
|
||||
<td>関連ファイルのURL</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
**ツールトレースメタデータ**
|
||||
|
||||
* message\_id - メッセージID
|
||||
* tool\_name - ツール名
|
||||
* tool\_inputs - ツール入力
|
||||
* tool\_outputs - ツール出力
|
||||
* tool\_config - ツール設定
|
||||
* time\_cost - コスト時間
|
||||
* error - エラー情報
|
||||
* tool\_parameters - ツールパラメータ
|
||||
* message\_file\_id - メッセージファイルID
|
||||
* created\_by\_role - 作成者の役割
|
||||
* created\_user\_id - 作成者のユーザーID
|
||||
188
zh/use-dify/monitor/integrations/integrate-aliyun.mdx
Normal file
188
zh/use-dify/monitor/integrations/integrate-aliyun.mdx
Normal file
@@ -0,0 +1,188 @@
|
||||
---
|
||||
title: 集成阿里云云监控
|
||||
---
|
||||
|
||||
## 什么是阿里云云监控
|
||||
|
||||
阿里云提供的全托管免运维可观测平台,一键开启 Dify 应用的监控追踪和评估。
|
||||
|
||||
<Info>
|
||||
阿里云云监控原生支持 Python/Golang/Java 应用通过 [LoongSuite](https://github.com/alibaba/loongsuite-python-agent)
|
||||
探针 & 开源 OpenTelemetry 探针接入,在一键开启 Dify 大模型应用监控外,还支持通过无侵入探针对 Dify 组件及其上下游依赖的全链路可观测。
|
||||
更多详情,请参考 [阿里云官方文档](https://help.aliyun.com/zh/cms/cloudmonitor-2-0/user-guide/model-application)。
|
||||
</Info>
|
||||
|
||||
## 如何配置云监控
|
||||
|
||||
### 1. 获取阿里云 Endpoint 和 License Key
|
||||
|
||||
1. 登录 [ARMS 控制台](https://arms.console.aliyun.com/),在左侧导航栏单击 **接入中心**。
|
||||
2. 在 **服务端应用** 区域单击 **OpenTelemetry** 卡片。
|
||||
3. 在弹出的 **OpenTelemetry** 面板中选择数据上报方式为 **gRPC**,并依据实际部署情况选择连接方式和地域。
|
||||
|
||||

|
||||
|
||||
4. 保存 **公网接入点(Endpoint)** 和 **鉴权 Token(License Key)**。
|
||||
> **说明**
|
||||
> Endpoint 不带端口号,例如 `http://tracing-cn-heyuan.arms.aliyuncs.com`。
|
||||
|
||||
### 2. 将云监控与 Dify 集成
|
||||
|
||||
> **📌 前提条件**
|
||||
> Dify Cloud | 社区版本号需 ≥ v1.6.0
|
||||
|
||||
1. 登录 **Dify 控制台**,并进入需要监控的 Dify 应用。
|
||||
2. 在左侧导航栏单击 **监测**。
|
||||
3. 单击 **追踪应用性能**,然后在 **云监控** 区域单击 **配置**。
|
||||
|
||||

|
||||
|
||||
4. 在弹出的对话框中输入步骤 1 获取的 **License Key** 和 **Endpoint**,并自定义 **App Name**(ARMS 控制台显示的应用名称),然后单击 **保存并启用**。
|
||||
|
||||
## 在云监控中查看监控数据
|
||||
|
||||
配置完成后,Dify 内应用的调试或生产数据可以在 **云监控** 中进行监控。
|
||||
|
||||
### 方式一:从 Dify 应用跳转 ARMS 控制台
|
||||
|
||||
在 Dify 控制台选择已开启应用追踪的应用,进入 **追踪配置**,在 **云监控** 区域单击 **查看**。
|
||||
|
||||

|
||||
|
||||
### 方式二:直接在 ARMS 控制台查看
|
||||
|
||||
在 ARMS 控制台的 **LLM 应用监控 > 应用列表** 页面进入对应的 Dify 应用。
|
||||
|
||||
## 接入更多数据
|
||||
|
||||
云监控提供了多语言无侵入探针,支持接入Dify集群的各个组件,实现全链路追踪。
|
||||
|
||||
| Dify 组件 | 探针 | 详情 |
|
||||
|---------------|--------------------|----------------|
|
||||
| Nginx | OpenTelemetry 探针 | [使用OpenTelemetry对Nginx进行链路追踪](https://help.aliyun.com/zh/opentelemetry/user-guide/use-opentelemetry-to-perform-tracing-analysis-on-nginx) |
|
||||
| Api | LoongSuite-Python 探针 | [loongsuite-python-agent](https://github.com/alibaba/loongsuite-python-agent/blob/main/README.md) |
|
||||
| Sandbox | LoongSuite-Go 探针 | [loongsuite-go-agent](https://github.com/alibaba/loongsuite-go-agent/blob/main/README.md) |
|
||||
| Worker | OpenTelemetry 探针 | [通过OpenTelemetry上报Python应用数据](https://help.aliyun.com/zh/opentelemetry/user-guide/use-managed-service-for-opentelemetry-to-submit-the-trace-data-of-python-applications) |
|
||||
| Plugin-Daemon | LoongSuite-Go 探针 | [loongsuite-go-agent](https://github.com/alibaba/loongsuite-go-agent/blob/main/README.md) |
|
||||
|
||||
## 监测数据清单
|
||||
|
||||
云监控支持采集Dify的Workflow/Chatflow/Chat/Agent应用,采集数据包括工作流和工作流节点的执行明细,涵盖模型调用、工具调用、知识检索和各类流程节点的执行明细数据以及会话和用户信息等元数据
|
||||
|
||||
### Workflow/Chatflow Trace信息
|
||||
|
||||
**Workflow Trace Info**
|
||||
|
||||
* workflow\_id - Workflow 的唯一标识
|
||||
* conversation\_id - 对话 ID
|
||||
* workflow\_run\_id - 此次运行的 ID
|
||||
* tenant\_id - 租户 ID
|
||||
* elapsed\_time - 此次运行耗时
|
||||
* status - 运行状态
|
||||
* version - Workflow 版本
|
||||
* total\_tokens - 此次运行使用的 token 总数
|
||||
* file\_list - 处理的文件列表
|
||||
* triggered\_from - 触发此次运行的来源
|
||||
* workflow\_run\_inputs - 此次运行的输入数据
|
||||
* workflow\_run\_outputs - 此次运行的输出数据
|
||||
* error - 此次运行中发生的错误
|
||||
* query - 运行时使用的查询
|
||||
* workflow\_app\_log\_id - Workflow 应用日志 ID
|
||||
* message\_id - 关联的消息 ID
|
||||
* start\_time - 运行开始时间
|
||||
* end\_time - 运行结束时间
|
||||
* workflow node executions - workflow 节点运行信息
|
||||
* Metadata
|
||||
* workflow\_id - Workflow 的唯一标识
|
||||
* conversation\_id - 对话 ID
|
||||
* workflow\_run\_id - 此次运行的 ID
|
||||
* tenant\_id - 租户 ID
|
||||
* elapsed\_time - 此次运行耗时
|
||||
* status - 运行状态
|
||||
* version - Workflow 版本
|
||||
* total\_tokens - 此次运行使用的 token 总数
|
||||
* file\_list - 处理的文件列表
|
||||
* triggered\_from - 触发来源
|
||||
|
||||
### Message Trace信息
|
||||
|
||||
**Message Trace Info**
|
||||
|
||||
* message\_id - 消息 ID
|
||||
* message\_data - 消息数据
|
||||
* user\_session\_id - 用户的 session\_id
|
||||
* conversation\_model - 对话模式
|
||||
* message\_tokens - 消息中的令牌数
|
||||
* answer\_tokens - 回答中的令牌数
|
||||
* total\_tokens - 消息和回答中的总令牌数
|
||||
* error - 错误信息
|
||||
* inputs - 输入数据
|
||||
* outputs - 输出数据
|
||||
* file\_list - 处理的文件列表
|
||||
* start\_time - 开始时间
|
||||
* end\_time - 结束时间
|
||||
* message\_file\_data - 消息关联的文件数据
|
||||
* conversation\_mode - 对话模式
|
||||
* Metadata
|
||||
* conversation\_id - 消息所属对话的 ID
|
||||
* ls\_provider - 模型提供者
|
||||
* ls\_model\_name - 模型 ID
|
||||
* status - 消息状态
|
||||
* from\_end\_user\_id - 发送用户的 ID
|
||||
* from\_account\_id - 发送账户的 ID
|
||||
* agent\_based - 是否基于代理
|
||||
* workflow\_run\_id - 工作流运行 ID
|
||||
* from\_source - 消息来源
|
||||
* message\_id - 消息 ID
|
||||
|
||||
### Dataset Retrieval Trace信息
|
||||
|
||||
**Dataset Retrieval Trace Info**
|
||||
|
||||
* message\_id - 消息 ID
|
||||
* inputs - 输入内容
|
||||
* documents - 文档数据
|
||||
* start\_time - 开始时间
|
||||
* end\_time - 结束时间
|
||||
* message\_data - 消息数据
|
||||
* Metadata
|
||||
* message\_id 消息 ID
|
||||
* ls\_provider 模型提供者
|
||||
* ls\_model\_name 模型 ID
|
||||
* status 消息状态
|
||||
* from\_end\_user\_id 发送用户的 ID
|
||||
* from\_account\_id 发送账户的 ID
|
||||
* agent\_based 是否基于代理
|
||||
* workflow\_run\_id 工作流运行 ID
|
||||
* from\_source 消息来源
|
||||
|
||||
### Tool Trace信息
|
||||
|
||||
**Tool Trace Info**
|
||||
|
||||
* message\_id 消息 ID
|
||||
* tool\_name 工具名称
|
||||
* start\_time 开始时间
|
||||
* end\_time 结束时间
|
||||
* tool\_inputs 工具输入
|
||||
* tool\_outputs 工具输出
|
||||
* message\_data 消息数据
|
||||
* error 错误信息,如果存在
|
||||
* inputs 消息的输入内容
|
||||
* outputs 消息的回答内容
|
||||
* tool\_config 工具配置
|
||||
* time\_cost 时间成本
|
||||
* tool\_parameters 工具参数
|
||||
* file\_url 关联文件的 URL
|
||||
* Metadata
|
||||
* message\_id 消息 ID
|
||||
* tool\_name 工具名称
|
||||
* tool\_inputs 工具输入
|
||||
* tool\_outputs 工具输出
|
||||
* tool\_config 工具配置
|
||||
* time\_cost 时间成本
|
||||
* error 错误信息
|
||||
* tool\_parameters 工具参数
|
||||
* message\_file\_id 消息文件 ID
|
||||
* created\_by\_role 创建者角色
|
||||
* created\_user\_id 创建者用户 ID
|
||||
Reference in New Issue
Block a user