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
5 changes: 3 additions & 2 deletions en/self-host/deploy/configuration/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1196,13 +1196,14 @@ By default, sign-in is email + password, and new accounts come from workspace in

#### LLMOps Trace Delivery

Traces of app runs are delivered to the configured LLMOps provider (Langfuse, LangSmith, Arize/Phoenix, and so on) by a background task. These variables govern its retries on transient failures.
Traces of app runs are delivered to the configured LLMOps provider (Langfuse, LangSmith, Arize/Phoenix, and so on) by a background task. For Docker Compose deployments, set these variables in `docker/envs/core-services/shared.env`.

| Variable | Default | Description |
|---|---|---|
| `OPS_TRACE_UNIFIED_ENABLED` | `false` | Set to `true` to give LangSmith and Arize/Phoenix traces a common structure for workflow runs, nodes, and their parent-child relationships. The default `false` uses each provider's original tracing implementation. Other providers are unaffected.<br/><br/>Each app still needs LLMOps enabled and a provider configured. |
| `OPS_TRACE_RETRYABLE_DISPATCH_MAX_RETRIES` | `780` | How many times a trace delivery is retried after a transient failure before the trace is dropped. <br/><br/>The default retry window (retries × `OPS_TRACE_RETRYABLE_DISPATCH_DELAY_SECONDS`) is sized to outlast the one-hour workflow limit plus the export grace period. <br/><br/>Today only Arize/Phoenix tracing of nested workflows hits this path (a child trace arriving before its parent's context). Cannot be `0`. |
| `OPS_TRACE_RETRYABLE_DISPATCH_DELAY_SECONDS` | `5` | Seconds between those retries; the total tolerance window is delay × max retries (about 65 minutes at defaults).<br/><br/>Lower delivers nested traces sooner but exhausts the retry budget faster. Cannot be `0`. |
| `OPS_TRACE_PARENT_CONTEXT_TTL_SECONDS` | `3900` | How long in seconds a parent workflow's trace context stays available for nested child traces to attach to.<br/><br/>Keep it at or above the retry window (retries × delay). |
| `OPS_TRACE_PARENT_CONTEXT_TTL_SECONDS` | `3900` | How long in seconds a parent workflow's trace context stays available for nested child traces to attach to.<br/><br/>When `OPS_TRACE_UNIFIED_ENABLED` is `true`, keep this at or above the retry window (retries × delay). A lower value prevents Dify from loading its configuration. |

#### Indexing

Expand Down
5 changes: 3 additions & 2 deletions ja/self-host/deploy/configuration/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1194,13 +1194,14 @@ Dify はアカウント招待、パスワードリセット、ログインコー

#### LLMOps トレース配信

アプリ実行のトレースは、バックグラウンドタスクが LLMOps プロバイダーへ配信します。対象のプロバイダーは Langfuse、LangSmith、Arize/Phoenix などです。以下の変数は、一時的な失敗時のリトライを制御します。
アプリ実行のトレースは、バックグラウンドタスクが LLMOps プロバイダーへ配信します。対象のプロバイダーは Langfuse、LangSmith、Arize/Phoenix などです。Docker Compose でデプロイする場合は、`docker/envs/core-services/shared.env` にこれらの変数を設定します。

| 変数 | デフォルト値 | 説明 |
|---|---|---|
| `OPS_TRACE_UNIFIED_ENABLED` | `false` | `true` にすると、LangSmith と Arize/Phoenix のトレースに共通の構造を使います。ワークフロー実行、ノード、それらの親子関係を記録します。デフォルトの `false` では、各プロバイダーの従来のトレース実装を使います。他のプロバイダーには影響しません。<br/><br/>各アプリで LLMOps を有効にし、プロバイダーを設定する必要があります。 |
| `OPS_TRACE_RETRYABLE_DISPATCH_MAX_RETRIES` | `780` | 一時的な失敗後にトレース配信をリトライする最大回数。超えるとそのトレースは破棄されます。<br/><br/>デフォルトのリトライ時間(回数 × `OPS_TRACE_RETRYABLE_DISPATCH_DELAY_SECONDS`)は、1 時間のワークフロー上限とエクスポート猶予期間を上回るよう設定されています。<br/><br/>現在この経路に入るのは、Arize/Phoenix でネストしたワークフローをトレースする場合のみです。子トレースが親のコンテキストより先に届くと発生します。`0` は指定できません。 |
| `OPS_TRACE_RETRYABLE_DISPATCH_DELAY_SECONDS` | `5` | リトライの間隔(秒)。許容ウィンドウは間隔 × 最大回数(デフォルトで約 65 分)です。<br/><br/>小さくするとネストしたトレースが早く届く一方、リトライ回数を早く使い切ります。`0` は指定できません。 |
| `OPS_TRACE_PARENT_CONTEXT_TTL_SECONDS` | `3900` | 親ワークフローのトレースコンテキストを保持する時間(秒)。保持中は、後から届くネストした子トレースが親に接続できます。<br/><br/>リトライ時間(回数 × 間隔)以上に設定してください。 |
| `OPS_TRACE_PARENT_CONTEXT_TTL_SECONDS` | `3900` | 親ワークフローのトレースコンテキストを保持する時間(秒)。保持中は、後から届くネストした子トレースが親に接続できます。<br/><br/>`OPS_TRACE_UNIFIED_ENABLED` が `true` の場合、リトライ時間(回数 × 間隔)以上に設定してください。これより小さいと、Dify は設定を読み込めません。 |

#### インデックス作成

Expand Down
5 changes: 3 additions & 2 deletions zh/self-host/deploy/configuration/environments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1194,13 +1194,14 @@ Dify 发送邮件用于账户邀请、密码重置、登录验证码和人工输

#### LLMOps 追踪投递

应用运行的追踪数据由后台任务投递给所配置的 LLMOps 供应商(Langfuse、LangSmith、Arize/Phoenix 等)。以下变量控制遇到瞬时失败后的重试行为。
应用运行的追踪数据由后台任务投递给所配置的 LLMOps 供应商(Langfuse、LangSmith、Arize/Phoenix 等)。使用 Docker Compose 部署时,在 `docker/envs/core-services/shared.env` 中设置这些变量。

| 变量 | 默认值 | 说明 |
|---|---|---|
| `OPS_TRACE_UNIFIED_ENABLED` | `false` | 设为 `true` 后,LangSmith 和 Arize/Phoenix 的追踪数据采用统一结构,记录工作流运行、节点及其父子关系。默认值 `false` 保留各供应商原有的追踪实现。其他供应商不受影响。<br/><br/>各应用仍需单独开启 LLMOps 并配置供应商。 |
| `OPS_TRACE_RETRYABLE_DISPATCH_MAX_RETRIES` | `780` | 追踪投递遇到瞬时失败后的最大重试次数,超出后该条追踪数据被丢弃。<br/><br/>默认重试窗口(次数 × `OPS_TRACE_RETRYABLE_DISPATCH_DELAY_SECONDS`)按覆盖一小时工作流上限加导出宽限期设定。<br/><br/>目前只有 Arize/Phoenix 追踪嵌套工作流时会触发(子追踪先于父级上下文到达)。不能设为 `0`。 |
| `OPS_TRACE_RETRYABLE_DISPATCH_DELAY_SECONDS` | `5` | 两次重试的间隔秒数;总容忍窗口约为间隔 × 最大次数(默认约 65 分钟)。<br/><br/>调低可让嵌套追踪更快送达,但重试次数消耗更快。不能设为 `0`。 |
| `OPS_TRACE_PARENT_CONTEXT_TTL_SECONDS` | `3900` | 父工作流追踪上下文的保留时长(秒),供后到的嵌套子追踪挂接。<br/><br/>取值应不低于重试窗口(次数 × 间隔)。 |
| `OPS_TRACE_PARENT_CONTEXT_TTL_SECONDS` | `3900` | 父工作流追踪上下文的保留时长(秒),供后到的嵌套子追踪挂接。<br/><br/>当 `OPS_TRACE_UNIFIED_ENABLED` 为 `true` 时,取值必须不低于重试窗口(次数 × 间隔)。低于此值会导致 Dify 无法加载配置。 |

#### 索引

Expand Down
Loading