function getConnection(shim) {
  const connectionPool = this.connectionPool.connections[0]
  const host = connectionPool.url.host.split(':')
  const port = connectionPool.url.port || host?.[1]
  return shim.captureInstanceAttributes(host[0], port)
}
Convenience function for deriving connection information from
elasticsearch

@param {object} shim The New Relic datastore-shim
@returns {Function} captureInstanceAttributes method of shim