function MetricNormalizer(config, type) {
  if (!config) {
    throw new Error('normalizer must be created with configuration.')
  }
  if (!type) {
    throw new Error('normalizer must be created with a type.')
  }

  EventEmitter.call(this)

  this.config = config
  this.type = type
  // some mildly cheesy polymorphism to make normalizers work generically
  if (type === 'URL') {
    this.formatter = url
  } else {
    this.formatter = plain
  }

  this.rules = []
}
The collector keeps track of rules that should be applied to metric names,
and sends these rules to the agent at connection time. These rules can
either change the name of the metric or indicate that metrics associated with
this name (which is generally a URL path) should be ignored altogether.

@param {object} config The agent's configuration blob, which has a parameter
                       that indicates whether to enforce the normalization
                       backstop.
@param type