spinframework / spinframework/spin
Include body sizes in outbound HTTP telemetry
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
This would be useful for egress bandwidth accounting. See e.g. https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-body-size
The easy version of this would be to just report body sizes based off of content-length headers, which would work for "most" requests. The harder but more complete version would be to use custom Body wrapper(s) to record the actual bytes written, which would additionally work for streaming/chunked-encoding bodies that have no content-length.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the outbound HTTP telemetry implementation and review the linked OpenTelemetry HTTP request body size specification. Compare reporting content-length values with wrapping request bodies to capture actual bytes, then verify that telemetry covers both ordinary and streaming or chunked requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100