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(spanner): allow custom lib name and version for telemetry purpose #4762
feat(spanner): allow custom lib name and version for telemetry purpose #4762
Conversation
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.
This seems reasonable. But I wonder if the user agent should also contain which version of the client lib is being used by the caller. E.g. should it be:
x-goog-api-client':
'spanner-activerecord/0.0.1 google-cloud-spanner/1.13.1 gl-ruby/ grpc/<gRPC_VERSION> gax/<GAX_VERSION>'
Also, minor nit, please reformat the doc strings added in this PR as the line-wrapping seems a bit off.
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.
The doc strings added here still needs to be reformatted.
@skuruppu Updated code and added a prefix to lib name while creating underline gapic client instance. |
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.
Thanks @jiren for updating the PR. LGTM.
03a0bee
to
7fb2800
Compare
#### Features * allow custom lib name and version for telemetry purpose ([#4762](https://www.github.com/googleapis/google-cloud-ruby/issues/4762)) * allow custom lib name and version for telemetry purpose * format docs * added custom lib name and version prefix * update test cases for lib name and version
Towards: #4761
Allow user-agent to be passed in and not a hardcoded version. This will helpful for database connector i.e ActiveRecord connector.