[PR #28289] Fix duration displayed for workflow steps on Weave dashboard #32005

Closed
opened 2026-02-21 20:50:34 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/28289

State: closed
Merged: Yes


Fixes #28288

Summary

This PR fixes the issue of 0 durations for each workflow step on the Weave dashboard. The root issue was that Weave only measured duration between create_call and finish_call, which were invoked after the workflow finished, resulting in all node durations appearing as ~0s. The fix bypasses this by having the tracing code directly send CallStartReq and CallEndReq messages, using the actual start_time and end_time from each workflow node to populate the started_at and ended_at fields.

Screenshots

Before After
image image

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/28289 **State:** closed **Merged:** Yes --- Fixes #28288 ## Summary This PR fixes the issue of 0 durations for each workflow step on the Weave dashboard. The root issue was that Weave only measured duration between `create_call` and `finish_call`, which were invoked after the workflow finished, resulting in all node durations appearing as ~0s. The fix bypasses this by having the tracing code directly send `CallStartReq` and `CallEndReq` messages, using the actual `start_time` and `end_time` from each workflow node to populate the `started_at` and `ended_at` fields. ## Screenshots | Before | After | |--------|-------| | <img width="800" height="818" alt="image" src="https://github.com/user-attachments/assets/55cf8bfc-fac1-4446-95d5-c938c6af7c02" /> | <img width="800" height="818" alt="image" src="https://github.com/user-attachments/assets/ef04c3c9-7b51-4e47-aaae-191eb997ebf6" /> | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:50:34 -05:00
yindo closed this issue 2026-02-21 20:50:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32005