function captureInstanceAttributes(host, port, database) {
  // See if we are currently in a segment created by us.
  const segment = this.getSegment()
  if (!segment || segment.shimId !== this.id) {
    this.logger.trace(
      'Not adding db instance metric attributes to segment %j',
      segment && segment.name
    )
    return
  }
  this.logger.trace('Adding db instance attributes to segment %j', segment.name)

  // Normalize the instance attributes.
  const attributes = _normalizeParameters.call(
    this,
    new DatastoreParameters({
      host,
      port_path_or_id: port,
      database_name: database
    })
  )

  for (const key in attributes) {
    if (attributes[key]) {
      segment.addAttribute(key, attributes[key])
    }
  }
}
Normalizes and adds datastore instance attributes to the current segment.

If the current segment was not created by this shim then no action is taken.

@memberof DatastoreShim.prototype
@param {string}        host      - The name of the database host.
@param {number|string} port      - The port, path, or ID of the database server.
@param {string}        database  - The name of the database in use.