Skip to content

Provide a mechanism to override classifyResponseStreaming behaviour #22876

Description

@hach-que

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions