'Extracts metrics from a prometheus summary metric and sends them as gauges'

def _submit_gauges_from_summary(self, name, metric, custom_tags=None):

    if (custom_tags is None):
        custom_tags = []
    val = getattr(metric, self.METRIC_TYPES[2]).sample_count
    self._submit_gauge('{}.count'.format(name), val, metric, custom_tags)
    val = getattr(metric, self.METRIC_TYPES[2]).sample_sum
    self._submit_gauge('{}.sum'.format(name), val, metric, custom_tags)
    for quantile in getattr(metric, self.METRIC_TYPES[2]).quantile:
        val = quantile.value
        limit = quantile.quantile
        self._submit_gauge('{}.quantile'.format(name), val, metric, custom_tags=(custom_tags + ['quantile:{}'.format(limit)]))
