function filterForContainerId (metricNames) {
  return function _filterForContainerId (metricInstances, { containerId }) {
    if (!containerId) return metricInstances
    // only filter out where (it is not a filterable metric) or (it is a filterable metric and the container instance matches)
    return metricInstances.filter(mi => !metricNames.includes(mi.metric) || metricNames.includes(mi.metric) && containerId === mi.instance)
  }
}
Removes anything not matching the configured containerId

Assumes the 'instance' tag refers to the container id, which it should do immediately after a mapContainerNames
if containerId is falsey, return existing instances

@param {string} metricNames the metric names to check for valid container ids
@return {function} a transform function