async functions don't add request ID metadata
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.
Yeah this looks like an oversight. I think it should be fairly easy for someone who isn't me to fix this issue, but I'll try to schedule some time for it.
I took a look at this and wrote a fix here https://github.com/swift-server/async-http-client/compare/main...ptoffy:async-http-client:add-logger-metadata.
However, I think there's a bigger issue here because while the logger is propagated correctly through the execution pipeline, it is never actually used and no logs are emitted at all. In fact if you run the test I've added it fails because there's no logs being collected. I'm not sure if this is intentional or not, but since HTTPClient.Request does log stuff it does seem like an oversight. I've got a reproducer here https://github.com/ptoffy/ahc-logging-test, happy to open a separate issue about this
That seems like a bug worth filing all of its own. We'd appreciate committing the test too!