Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
0.7
-
KANBAN BUCKET
-
true
Description
Documentation Request Summary:
This change now has the mongo shell support setting a custom appname parameter. So now doing:
mongo mongodb://localhost/test?appname=MyApp
|
Sets a custom appname which appears in db.currentOp(), db.system.profile when profiling is enabled, and in the logs.
Drivers already support this, but we have documented that the shell will always specify the appname as "MongoDB Shell" here: https://docs.mongodb.com/manual/reference/command/currentOp/#iddup.currentOp.appName
and here: https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.appName
This was correct before this change, but now that is only the default.
Also I think we should add it to the connection string reference: https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options to add this under "Miscellaneous Configuration"
Engineering Ticket Description:
This likely involves adding an additional parameter to the Mongo object constructor and forwarding the metadata to the underlying DBClient instance.
Connection handshake
The isMaster handshake, as of MongoDB 3.4, supports a new argument, client, provided as a BSON object. This object has the following structure::
{
isMaster: 1,
client: {
/* OPTIONAL. If present, the "name" is REQUIRED */
application: {
name: "<string>"
},
/* REQUIRED, including all sub fields */
driver: {
name: "<string>",
version: "<string>"
},
/* REQUIRED */
os: {
type: "<string>", /* REQUIRED */
name: "<string>", /* OPTIONAL */
architecture: "<string>", /* OPTIONAL */
version: "<string>" /* OPTIONAL */
},
/* OPTIONAL */
platform: "<string>"
}
}
Attachments
Issue Links
- documents
-
SERVER-32094 Add support for mongo shell to send client.application.name in initial isMaster request
-
- Closed
-
- related to
-
SERVER-35309 Connection string option is appname; currentOp, logs, etc. use appName
-
- Closed
-