Measure HTTP request body length, number of events in body
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 543
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 109
Description
The server currently reports Content-Length in logs, and accumulates it in metrics, if it is not -1 -- i.e. not chunked encoding. We should also look into measuring the body size when chunked encoding is in use. Ideally we would also count the number of events in each payload.
This would be helpful in performance investigations, where the number of requests either remains stable or increases only slightly, but the payload size of requests increases significantly.
We will need to ensure the measurement does not negatively impact performance when the server's queue is full, and payloads are not fully decoded.
Contributor guide
Research direction
Start by tracing where Content-Length is logged and accumulated in metrics, then inspect how chunked request bodies and queue-full paths are handled. Define measurements for chunked body size and events per payload, and verify that performance is unaffected when payloads are not fully decoded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100