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

feat: add support for a custom user agent #233

Merged
merged 1 commit into from
Jan 26, 2024
Merged

feat: add support for a custom user agent #233

merged 1 commit into from
Jan 26, 2024

Conversation

enocom
Copy link
Member

@enocom enocom commented Jan 26, 2024

When callers initialize a Connector, they can now provide a space-separated list of custom user agents. This custom user agent will be appended to the existing user agent, e.g.,

alloydb-python-connect/v0.6.0 custom-agent/v1.0.0 other-agent/v2.0.0

@enocom enocom requested review from cthumuluru, nancynh and a team as code owners January 26, 2024 18:01
@enocom enocom force-pushed the custom-user-agent branch 4 times, most recently from b02c97b to 39ac2b5 Compare January 26, 2024 19:35
@@ -54,12 +54,14 @@ def __init__(
quota_project: Optional[str] = None,
alloydb_api_endpoint: str = "https://alloydb.googleapis.com",
enable_iam_auth: bool = False,
user_agent: Optional[str] = None,

Choose a reason for hiding this comment

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

nit:

Suggested change
user_agent: Optional[str] = None,
custom_user_agent: Optional[str] = None,

Copy link
Member Author

Choose a reason for hiding this comment

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

I started with that actually and Jack and I've been debating it. Since the AlloyDB Go Connector uses "user agent," I think consistency is probably best here.

When callers initialize a Connector, they can now provide a
space-separated list of custom user agents. This custom user agent will
be appended to the existing user agent, e.g.,

alloydb-python-connect/v0.6.0 custom-agent/v1.0.0 other-agent/v2.0.0
@enocom enocom merged commit 5c030c4 into main Jan 26, 2024
15 checks passed
@enocom enocom deleted the custom-user-agent branch January 26, 2024 20:34
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.

3 participants