wrapRequestHandler in packages/bun/src/integrations/bunserver.ts:189 uses startSpan, which ends the span as soon as the handler returns. Deno (streamResponse) and Cloudflare (classifyResponseStreaming plus a TransformStream) both keep the span open until the body finishes.
An SSE or LLM streaming route on Bun reports a span duration covering only the handler, not the stream. This is the common shape for AI apps, which are a large part of the Bun audience.
Work item. Move classifyResponseStreaming into @sentry/core or @sentry/server-utils (see D10) and adopt it in bunserver.ts with startSpanManual.
wrapRequestHandlerinpackages/bun/src/integrations/bunserver.ts:189usesstartSpan, which ends the span as soon as the handler returns. Deno (streamResponse) and Cloudflare (classifyResponseStreamingplus aTransformStream) both keep the span open until the body finishes.An SSE or LLM streaming route on Bun reports a span duration covering only the handler, not the stream. This is the common shape for AI apps, which are a large part of the Bun audience.
Work item. Move
classifyResponseStreaminginto@sentry/coreor@sentry/server-utils(see D10) and adopt it inbunserver.tswithstartSpanManual.