GoogleCloudPlatform / alloydb-python-connector

A Python library for connecting securely to your AlloyDB instances.
Apache License 2.0
28 stars 7 forks source link

Investigate having `user_agent` support driver version #205

Open jackwotherspoon opened 7 months ago

jackwotherspoon commented 7 months ago

Now that we support asyncpg and pg8000 we should try to add the driver being used by the connector's client to the user agent string

https://github.com/GoogleCloudPlatform/alloydb-python-connector/blob/main/google/cloud/alloydb/connector/client.py#L28

jackwotherspoon commented 7 months ago

Added support for driver user agents as part of #191 but it is not a long-term solution. Since we support only asyncpg through the AsyncConnector class and only pg8000 through the Connector it works currently. But it would not if we were to add support for a new driver so it needs improving still.