-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add s3 session wrapper #927
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
I had to hunt around for this, and the first place I looked was the Makefile (where I would expect code generation to occur).
note: default |
seems like
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! The main thing I'd like to see is to move this to a more general module that can create spans for arbitrary aws-sdk-go services.
There are two names the bucket name can get encoded into the request URL, either as a subdomain prepended to the host, or as the first member in the path. Handle both of these, as we don't have control over which will be used. Even if explicitly set in the config to use the hosted bucket style, it might only be able to do the path style. https://github.com/aws/aws-sdk-go/blob/main/aws/config.go#L118-L127
also, add make target that will update the file if a new module is created.
seems the tests are failing to build on older versions of go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there, just a few more small things. We'll also need to add docs: docs/supported_tech.asciidoc and docs/instrumenting.asciidoc. Up to you if you want to do it in this PR or in a followup
This reverts commit 6b84892.
This reverts commit 052125a.
As mentioned in the comment, after 3 attempts I wasn't able to find an S3 request that used the virtual bucket style pathing (which is supposed to be the default). I opted to test the function for now, even though it's private.
If the bucket name is all caps, it forces the path style URL structure; if the bucket name is lowercase, it will default to virtual bucket style. Test that both cases are handled.
Going to merge this in favor of moving forward on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great now, thank you!
Add a wrapper around the aws-sdk-go `session.Session` struct which instruments outgoing requests. This currently only correctly traces calls to `s3`; using the session with other services will produce incorrect traces.
tracing for #881
note:
this is still a draft. I have a few questions which I'll call out specifically below.