Skip to content
Permalink
Browse files
feat(spanner): include User agent (#3465)
Co-authored-by: Knut Olav Løite <koloite@gmail.com>
  • Loading branch information
mohanli-ml and olavloite committed Dec 22, 2020
1 parent 404b6c6 commit 4e1ef1b3fb536ef950249cdee02cc0b6c2b56e86
Showing with 6 additions and 0 deletions.
  1. +1 −0 spanner/client.go
  2. +5 −0 spanner/doc.go
@@ -177,6 +177,7 @@ func NewClientWithConfig(ctx context.Context, database string, config ClientConf
),
),
option.WithGRPCConnectionPool(config.NumChannels),
option.WithUserAgent(clientUserAgent),
}
// opts will take precedence above allOpts, as the values in opts will be
// applied after the values in allOpts.
@@ -357,3 +357,8 @@ at https://godoc.org/go.opencensus.io/trace. OpenCensus tracing requires Go 1.8
or higher.
*/
package spanner // import "cloud.google.com/go/spanner"

// clientUserAgent identifies the version of this package.
// It should be the same as https://pkg.go.dev/cloud.google.com/go/spanner.
// TODO: We will want to automate the version with a bash script.
const clientUserAgent = "spanner-go/v1.12.0"

0 comments on commit 4e1ef1b

Please sign in to comment.