异步调用时Context没有传递到子线程 | How to carry Sentinel context in async scenarios
Open
kind/question
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Description
ContextUtil将Context保存在ThreadLocal中,当主线程在线程池中调用下游资源时,没有将ThreadLocal传递到下游的子线程,
下游资源在entry时由于没有Context会使用默认的ContextName创建,这样会导致基于链路入口的统计数据不准确
Contributor guide
Research direction
Start by tracing ContextUtil's ThreadLocal usage through thread-pool calls and downstream resource entry. Done means the Sentinel context reaches the child thread so downstream entries retain the originating context and chain-based statistics remain accurate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100