Allow Instantiated MongoClients to Send Client Metadata On-Demand

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.18.0
    • Affects Version/s: None
    • Component/s: None
    • 3
    • Hide

      DRIVERS-2985:
      Summary of necessary driver changes

      • Add API to MongoClient to support appending metadata (driver name, version, platform) after it’s been created and initialized.

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Show
      DRIVERS-2985 : Summary of necessary driver changes Add API to MongoClient to support appending metadata (driver name, version, platform) after it’s been created and initialized. Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) Unified spec tests: yml json Prose tests: README
    • Not Needed
    • None
    • Node Drivers
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Needed
    • Hide

      Users can now append driver information to the metadata that will be passed along with the initial handshake on any new connection that gets opened. Fields available are name, version, and platform.

       

      import { MongoClient } from 'mongodb';
      const client = new MongoClient(process.env.MONGODB_URI);
      client.appendMetadata({ name: 'my library', version: '1.0', platform: 'NodeJS' }); 
      Show
      Users can now append driver information to the metadata that will be passed along with the initial handshake on any new connection that gets opened. Fields available are name , version , and platform .   import { MongoClient } from 'mongodb' ; const client = new MongoClient(process.env.MONGODB_URI); client.appendMetadata({ name: 'my library' , version: '1.0' , platform: 'NodeJS' });
    • None
    • None
    • None
    • None
    • None
    • None

      This ticket was split from DRIVERS-2985, please see that ticket for a detailed description.

       

      AC:

      • Add new DriverInfoOptions interface with name, version, platform properties
      • Implement appendMetadata on the MongoClient that appends the 3 options to the existing client metadata.

      Testing:

      • Implement new prose tests
      • Implement unified runner changes and sync new unified tests

      Docs:

      • Document the new API in our API docs and in the MongoDB manual so that extension developers can easily reference it

            Assignee:
            Durran Jordan
            Reporter:
            TPM Jira Automations Bot
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: