langgenius / langgenius/dify

Refactor shared tracing queue to isolate tenant routing state

Open
#41,409 0 comments 1 reaction 1 assignee Claimed by @laipz8200 View on GitHub
project#dify
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

## Problem

The tracing pipeline uses a process-wide queue, while `TraceQueueManager` is request-scoped and carries `app_id`, `user_id`, provider, and Flask lifecycle state. The fix merged in #41403 preserves the originating `app_id` on each task, but the underlying design still couples a global work stream to stateful manager/timer instances.

This makes tenant routing correctness depend on mutable task state and leaves timer ownership, queue draining, and failure isolation difficult to reason about.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.