Weave tracing reports 0 duration for all workflow steps #20369

Closed
opened 2026-02-21 20:07:03 -05:00 by yindo · 1 comment
Owner

Originally created by @xprilion on GitHub (Nov 17, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.10.0, 1.9.2

Cloud or Self Hosted

Self Hosted (Source), Cloud, Self Hosted (Docker)

Steps to reproduce

  1. Create any workflow
  2. Click on Monitoring, configure Weave as the tracing provider
  3. Run the workflow
  4. Head to Weave dashboard and click on the workflow's run trace
  5. Check the duration of the intermediate steps of the workflow run

✔️ Expected Behavior

Durations displayed for intermediate steps should not be all 0.

Actual Behavior

Durations for all intermediate steps are 0

Image
Originally created by @xprilion on GitHub (Nov 17, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.10.0, 1.9.2 ### Cloud or Self Hosted Self Hosted (Source), Cloud, Self Hosted (Docker) ### Steps to reproduce 1. Create any workflow 2. Click on `Monitoring`, configure `Weave` as the tracing provider 3. Run the workflow 4. Head to Weave dashboard and click on the workflow's run trace 5. Check the duration of the intermediate steps of the workflow run ### ✔️ Expected Behavior Durations displayed for intermediate steps should not be all 0. ### ❌ Actual Behavior Durations for all intermediate steps are 0 <img width="800" height="818" alt="Image" src="https://github.com/user-attachments/assets/eb82d9b2-db90-4659-8d95-c25ed2337966" />
yindo added the 🐞 bug label 2026-02-21 20:07:03 -05:00
yindo closed this issue 2026-02-21 20:07:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 17, 2025):

This bug is already tracked in GitHub issue #1542. The root cause is that Dify's Weave integration replays workflow node executions after the run completes, calling Weave's start_call and finish_call methods back-to-back for each node. Since Weave measures duration as the time between these calls, and there's no delay during replay, all intermediate steps show 0ms duration—even though the actual timing data is present in Dify's persistence layer and sent as attributes to Weave. The overall workflow duration is correct because it's measured over the full run, but individual steps appear instantaneous in the Weave dashboard. This is a limitation of how the trace exporter interacts with the Weave SDK, not a loss of timing data in Dify itself.

A potential workaround would be to modify the trace exporter to use Weave's manual call tracking API, explicitly setting the start and end timestamps for each node execution based on the persisted timing data, rather than relying on the immediate start/finish sequence. This would allow Weave to display accurate durations for each workflow step.

For reference, you can see the relevant trace logic in the Dify codebase here and the node timing calculation here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 17, 2025): <!-- Answer --> This bug is already tracked in GitHub issue #1542. The root cause is that Dify's Weave integration replays workflow node executions after the run completes, calling Weave's `start_call` and `finish_call` methods back-to-back for each node. Since Weave measures duration as the time between these calls, and there's no delay during replay, all intermediate steps show 0ms duration—even though the actual timing data is present in Dify's persistence layer and sent as attributes to Weave. The overall workflow duration is correct because it's measured over the full run, but individual steps appear instantaneous in the Weave dashboard. This is a limitation of how the trace exporter interacts with the Weave SDK, not a loss of timing data in Dify itself. A potential workaround would be to modify the trace exporter to use Weave's manual call tracking API, explicitly setting the start and end timestamps for each node execution based on the persisted timing data, rather than relying on the immediate start/finish sequence. This would allow Weave to display accurate durations for each workflow step. For reference, you can see the relevant trace logic in the Dify codebase [here](https://github.com/langgenius/dify/blob/5d2fbf5215806b5afae40704069865d2bd67b336/api/core/ops/weave_trace/weave_trace.py#L33-L456) and the node timing calculation [here](https://github.com/langgenius/dify/blob/5d2fbf5215806b5afae40704069865d2bd67b336/api/core/workflow/graph_engine/layers/persistence.py#L74-L404). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5842ded4-c6ab-41d8-a4b0-6ef6ebb635f2?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5842ded4-c6ab-41d8-a4b0-6ef6ebb635f2?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5842ded4-c6ab-41d8-a4b0-6ef6ebb635f2?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5842ded4-c6ab-41d8-a4b0-6ef6ebb635f2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5842ded4-c6ab-41d8-a4b0-6ef6ebb635f2?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5842ded4-c6ab-41d8-a4b0-6ef6ebb635f2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5842ded4-c6ab-41d8-a4b0-6ef6ebb635f2?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/28288)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20369