Skip to content

Commit

Permalink
feat(spanner): include User agent
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanli-ml committed Dec 15, 2020
1 parent e8d5032 commit be88d07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions spanner/client.go
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions spanner/doc.go
Expand Up @@ -357,3 +357,7 @@ 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.
const clientUserAgent = "spanner-go/v1.12.0"

0 comments on commit be88d07

Please sign in to comment.