Skip to content
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

Adding new logic to send user-agent in S3 Requests #42

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

fuatbasik
Copy link
Contributor

With this commit, we will send s3connectorframework user-agent in every S3 request to help with observability. This commit also introduces ObjectClientConfiguration to let uses to prepend user-agent with custom values.

Issue #, if available:

Description of changes:
1- Introducing a new configuration for ObjectClient that helps us to prepend User-Agent.
2- S3SDKObjectClient by default adds s3connectorframework:version-info (version to be decided) to the user agent.
3- Testing new user agent via unit tests. Note that there are no integration tests to confirm

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

public final class UserAgent {
// Hard-coded user-agent string
private static final String UA_STRING = "s3connectorframework";
// TODO: Get VersionInfo and append it to UA. We need to understand how to create (if we want a)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far our practice was to list code TODOs to Asana tickets. I believe we have a similar item already, let me dig it up for you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might not be directly related, but similar: https://app.asana.com/0/1206885953994785/1207481230403504/f

@fuatbasik fuatbasik force-pushed the feature/add-user-agent branch 2 times, most recently from 6fdebd6 to 8defe77 Compare June 11, 2024 13:56
With this commit, we will send s3connectorframework user-agent in
every S3 request to help with observability. This commit also
introduces ObjectClientConfiguration to let uses to prepend user-agent
with custom values.
@fuatbasik fuatbasik force-pushed the feature/add-user-agent branch from 8defe77 to 6f98e6d Compare June 14, 2024 12:34
@fuatbasik fuatbasik force-pushed the feature/add-user-agent branch from 6f98e6d to 1ebd931 Compare June 14, 2024 13:27
Copy link
Contributor

@CsengerG CsengerG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fuatbasik fuatbasik merged commit d180d0b into awslabs:main Jun 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants