bun, deno: `http.server` span ends before a streamed SSR response has been sent
Maintainer thường phản hồi trong vòng 1 ngày
@JPeer264 đang làm issue này rồi.
Từ ngày 20/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bun, deno, typescript
- Lĩnh vực
- backend, observability
Hướng nghiên cứu
Start by reading bunServerIntegration, denoServeIntegration, and the shared classifyResponseStreaming in @sentry/core/server; compare the Cloudflare implementation referenced in the issue. Check the Bun and Deno integration tests for span lifetime and response behavior. Done means streamed SSR spans stay open through sending, while Deno returns the handler response unchanged and Bun supports the proposed callback fallback.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
bunServerIntegration and denoServeIntegration end the http.server span when the handler returns, unless the shared classifier classifyResponseStreaming (@sentry/core/server) says that the response streams. The classifier knows Server-Sent Events, NDJSON, application/stream+json, and text/plain and text/x-component without a Content-Length. HTML does not count as streamed, because a buffered new Response(html) has no Content-Length either.
So for a streamed SSR page, the span ends too early. Spans created while the body streams, for example a Suspense render or a data fetch, end after their root span. On Cloudflare, getsentry/sentry-javascript#24932 adds the isStreamingResponse option for this. Bun and Deno have no fix yet.
Proposal
Deno: end the span on info.completed (Deno.ServeHandlerInfo) for every response, and return the handler's response unchanged. completed settles when the response has been sent or could not be sent. Then Deno needs no classifier and no option, and static bodies keep Deno's fast path and their Content-Length.
Bun: Bun.serve does not tell the handler when the response has been sent. Add isStreamingResponse(response, request) to bunServerIntegration, with the same contract as on Cloudflare: true keeps the span open until the body has been sent, false ends it at handler return, and any other value uses classifyResponseStreaming.
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [
Sentry.bunServerIntegration({
isStreamingResponse: response =>
response.headers.get('content-type')?.startsWith('text/html') ? true : undefined,
}),
],
});
- Ngôn ngữ chính
- TypeScript
- Star
- 8.8k
- Fork
- 1.9k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 744
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-javascript
-
AWS Lambda Waiting for: Product Owner
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
getsentry/sentry-javascript#26910 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Only create Nuxt database and storage spans when there is a parent spanCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởImprovement Nuxt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
getsentry/sentry-javascript#25805 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Only create Cloudflare storage and D1 db spans when there is a parent spanCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởCloudflare Workers Improvement Spans
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/sentry-javascript#25804 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Core Feature: Typescript Meta: Breaking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
getsentry/sentry-javascript#25286 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
getsentry/sentry-javascript#24200 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/sentry-javascript
Issue tương tự
-
foreground-up-signals-live: delivery-repair cell expects a spawn suggestion status no longer printsĐang mởbug triage:owned
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
e2e-failure ready-to-code
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
redhat-developer/rhdh-plugin-export-overlays#4905 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
directus/directus#28558 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
review: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
1lck/Lithe-IDEA#2432 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
cloudflare/workers-sdk#17189 ·
Maintainer thường phản hồi trong vòng 1 ngày