getsentry / getsentry/sentry-rust
Preserve Hub binding for streaming responses in sentry-tower/axum
- Dominant language
- Rust
- Stars
- 752
- Forks
- 190
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 5
Description
When using the `sentry-tower`/`axum` integration with streaming responses, the middleware binds the hub only for the request handler. Once the handler returns a streaming body, the middleware unwinds and `axum` drains the stream outside that hub. This causes missing context and any newly set context to be attached to the wrong hub during stream evaluation.
Track the tracing/transaction behavior separately in getsentry/sentry-rust#1053.
A possible direction is to bind the hub to the response stream, similar to getsentry/objectstore#526.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the sentry-tower/axum middleware and how it handles the response body after the request handler returns. Compare the response-stream hub-binding approach in getsentry/objectstore#526. Done means streamed response evaluation preserves the request hub and newly set context is attached to that hub; keep tracing and transaction behavior separate per getsentry/sentry-rust#1053.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100