From a76b1a0386e403ec1373d1d302bca8566f8bfa0f Mon Sep 17 00:00:00 2001 From: Dom Date: Wed, 6 Sep 2017 15:59:38 +0100 Subject: [PATCH] Update README to add appName (#32) * docs: elaborate on what appName does * readme: add appName to changes --- README.md | 3 ++- session.go | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0bf24c430..fce236bf7 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,10 @@ Further PR's (with tests) are welcome, but please maintain backwards compatibili * Fixes timezone handling ([details](https://github.com/go-mgo/mgo/pull/464)) * Integration tests run against newest MongoDB 3.2 releases ([details](https://github.com/globalsign/mgo/pull/4), [more](https://github.com/globalsign/mgo/pull/24)) * Improved multi-document transaction performance ([details](https://github.com/globalsign/mgo/pull/10), [more](https://github.com/globalsign/mgo/pull/11), [more](https://github.com/globalsign/mgo/pull/16)) -* Fixes cursor timeouts ([detials](https://jira.mongodb.org/browse/SERVER-24899)) +* Fixes cursor timeouts ([details](https://jira.mongodb.org/browse/SERVER-24899)) * Support index hints and timeouts for count queries ([details](https://github.com/globalsign/mgo/pull/17)) * Allow dropping all indexes on a collection ([details](https://github.com/globalsign/mgo/pull/25)) +* Annotates log entries/profiler output with optional appName on 3.4+ ([details](https://github.com/globalsign/mgo/pull/28)) --- diff --git a/session.go b/session.go index cfe271ff9..65ea64bb3 100644 --- a/session.go +++ b/session.go @@ -157,9 +157,9 @@ const ( // topology. // // Dial will timeout after 10 seconds if a server isn't reached. The returned -// session will timeout operations after one minute by default if servers -// aren't available. To customize the timeout, see DialWithTimeout, -// SetSyncTimeout, and SetSocketTimeout. +// session will timeout operations after one minute by default if servers aren't +// available. To customize the timeout, see DialWithTimeout, SetSyncTimeout, and +// SetSocketTimeout. // // This method is generally called just once for a given cluster. Further // sessions to the same cluster are then established using the New or Copy @@ -184,8 +184,8 @@ const ( // If the port number is not provided for a server, it defaults to 27017. // // The username and password provided in the URL will be used to authenticate -// into the database named after the slash at the end of the host names, or -// into the "admin" database if none is provided. The authentication information +// into the database named after the slash at the end of the host names, or into +// the "admin" database if none is provided. The authentication information // will persist in sessions obtained through the New method as well. // // The following connection options are supported after the question mark: @@ -237,8 +237,8 @@ const ( // // appName= // -// The identifier of the client application which ran the operation. This -// param can't exceed 128 bytes +// The identifier of this client application. This parameter is used to +// annotate logs / profiler output and cannot exceed 128 bytes. // // Relevant documentation: //