spinframework / spinframework/spin

Include body sizes in outbound HTTP telemetry

Open
#3,188 4 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.