getsentry / getsentry/sentry-javascript

Provide a mechanism to override `classifyResponseStreaming` behaviour

オープン
#22,876 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る
Cloudflare Workers Feature post-hackweek Spans
主要言語
TypeScript
スター
8.7k
フォーク
1.8k
平均マージ
1日 17時間
マージ済み PR(30日)
515

説明

### Problem Statement

I have a React RSC application that is streaming responses, and `classifyResponseStreaming` does not correctly detect the HTTP response as a stream because it is limited to only a few content types. I would like to be able to override the detection behaviour so I can avoid spans ending early.

https://github.com/getsentry/sentry-javascript/blob/develop/packages/cloudflare/src/request.ts#L146

### Solution Brainstorm

It would be ideal if the Sentry SDK had an optional callback that could be set to inspect a response and return whether or not the response is streaming.

### Additional Context

_No response_

### Priority

_No response_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start in packages/cloudflare/src/request.ts at classifyResponseStreaming and trace its callers to understand how the current content-type checks affect span completion. Define how an optional response-inspection callback should override the built-in classification, then verify that custom streaming responses keep their spans open until streaming finishes.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react, typescript
領域
api, backend, cloud
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。