Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11246

Documenting support for mongo shell to send client.application.name in initial isMaster request

    XMLWordPrintable

    Details

    • Last comment by Customer:
      true
    • Story Points:
      0.7
    • Sprint:
      KANBAN BUCKET

      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>"
          }
      }
      

      https://github.com/mongodb/specifications/blob/5499fd336aaa8d91bdd7cb285fa661f512be72dd/source/mongodb-handshake/handshake.rst#connection-handshake

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              allison.moore Allison Reinheimer Moore
              Reporter:
              kay.kim Kay Kim (Inactive)
              Participants:
              Last commenter:
              Allison Reinheimer Moore Allison Reinheimer Moore
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                3 years, 32 weeks, 2 days ago
                Date of 1st Reply: