Skip to content

[fix] Fixed the issue of excessive/redundant spans being returned for streaming requests. - #4375

Merged
EmmonsCurse merged 4 commits into
PaddlePaddle:developfrom
qwes5s5:fix_span_new
Oct 15, 2025
Merged

EmmonsCurse merged 4 commits into
PaddlePaddle:developfrom
qwes5s5:fix_span_new

Conversation

@qwes5s5

@qwes5s5 qwes5s5 commented Oct 13, 2025

Copy link
Copy Markdown
Collaborator

修复了发送流式请求返回流式结果冗余span过多的问题。
主要修复思路如下:

  1. 标记流式响应
  2. 自定义span处理器FilteringSpanProcessor,其中可以实现继承父span的流式标记、过滤符合条件的冗余span
  3. 修改api_server的流式响应包装器,对父span添加事件first chunk和last chunk,每个事件会记录时间戳,同时last chunk会额外记录总chunk数

@paddle-bot

paddle-bot Bot commented Oct 13, 2025

Copy link
Copy Markdown

Thanks for your contribution!

@paddle-bot paddle-bot Bot added the contributor External developers label Oct 13, 2025
@EmmonsCurse
EmmonsCurse merged commit abb6262 into PaddlePaddle:develop Oct 15, 2025
14 of 17 checks passed
xiaoguoguo626807 pushed a commit to xiaoguoguo626807/FastDeploy that referenced this pull request May 7, 2026
… streaming requests. (PaddlePaddle#4375)

* fix stream span

* fix stream span
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants