Does anyone know how to add fields from context to...
# dev
a
Does anyone know how to add fields from context to those emitted by an AWS client? This is for https://github.com/treeverse/lakefs/issues/2682. Context (sorry): Looking to "thread" our request_id field throughout all lakeFS logs. One issue that has me confused is how to get AWS to log with request IDs. Something like https://github.com/aws/aws-sdk-go/pull/3485 would be great, but that PR went silent. I do no want to dupe the client only to change its configuration, that may be overpowering for the issue.
https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/logging/#context-aware-loggers may be an answer, but requires using AWS Go SDK v2. @Barak Amar do you know if this major version bump is worthwhile / safe?
b
Last time I checked it was beta - looking again
a
Let's continue this discussion on the issue that I'm opening.
b
Looks like they leverage the go modules to have different releases for each service. Modern "WithXXX" API for configuration. Cache for credentials. Iterator vs callback for pagination.
Good idea
a
#2684
👍 1
A v2 interface that actually tries to improve on known deficiencies in the v1 interface... Just pinched myself, apparently not dreaming.