function cmdStartedHandler(shim, evnt) {
  if (evnt.connectionId) {
    const address = parseAddress(evnt.address)
    let [host] = address
    const [, port] = address
    if (['127.0.0.1', '::1', '[::1]'].includes(host)) {
      host = 'localhost'
    }

    shim.captureInstanceAttributes(host, port, evnt.databaseName)
  }
}
`commandStarted` handler used to
update host, port and database_name
on segment attributes

@param {Shim} shim instance of shim
@param {CommandStartedEvent} evnt mongodb event