swift-server / swift-server/async-http-client
async functions don't add request ID metadata
Open
Nobody has claimed this yet.
kind/bug
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
When sending an HTTPClient.Request it sets metadata on the logger, such as ahc-request-id. When using HTTPClientRequest (i.e. using the async APIs) this metadata is not set on the logger.
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
Compare the HTTPClient.Request and HTTPClientRequest sending paths to find where logger metadata, including ahc-request-id, is set for the synchronous API. Trace the async API entry point and verify that equivalent request metadata is present on the logger when an HTTPClientRequest is sent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100