You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BigQuery: Add user-agent info to Jupyter magics Client constructor(s). #8696
In order to better prioritize jupyter features such as #8342 and #8143, it is important for Google to know how much these features are used to query BigQuery. This is done by populating the user-agent string with the corresponding "application name" and version information.
I propose we use the IPython version information in this string, as these magics are being used from an IPython kernel. Getting the IPython version string: https://stackoverflow.com/a/56265255/101923 Something like:
Re-opening. I forgot to mention we create another client that'll need similar treatment. We can construct a BigQuery Storage API client, which is a gapic client, so needs the other ClientInfo class.
changed the title [-]BigQuery: Add user-agent info to Jupyter magics Client constructor.[/-][+]BigQuery: Add user-agent info to Jupyter magics Client constructor(s).[/+]on Jul 22, 2019
Activity
tswast commentedon Jul 22, 2019
Re-opening. I forgot to mention we create another client that'll need similar treatment. We can construct a BigQuery Storage API client, which is a gapic client, so needs the other ClientInfo class.
https://github.com/plamut/google-cloud-python/blob/7b6aecc10ed355b7b81ceb7bbe56000ebc0dd778/bigquery/google/cloud/bigquery/magics.py#L442
tswast commentedon Jul 22, 2019
Since the grpc stuff is an optional dependency, let's import it in the
_make_bqstorage_clientfunction.[-]BigQuery: Add user-agent info to Jupyter magics Client constructor.[/-][+]BigQuery: Add user-agent info to Jupyter magics Client constructor(s).[/+]plamut commentedon Jul 22, 2019
Thanks for the update, I will look at that as well.