def add(self, metric_producer):
        """Add a metric producer.

        :type metric_producer: :class: 'MetricProducer'
        :param metric_producer: The metric producer to add.
        """
        if metric_producer is None:
            raise ValueError
        with self.mp_lock:
            self.metric_producers.add(metric_producer)
Add a metric producer.

        :type metric_producer: :class: 'MetricProducer'
        :param metric_producer: The metric producer to add.