code: func (p *promProducer) Collect(ch chan<- prometheus.Metric) {
  	for name, datapointsLabels := range datapointLabelsByName(p.store) {
  		variableLabels := getLabelNames(datapointsLabels)
  		desc := prometheus.NewDesc(sanitize(name), "DC/OS Metrics Datapoint", sanitizeSlice(variableLabels), nil)
  
  		// Publish a metric for each datapoint.
  		for _, dpLabels := range datapointsLabels {
  			// Collect this datapoint's variable label values.
  			var variableLabelVals []string
  			for _, labelName := range variableLabels {
  				if val, ok := dpLabels.labels[labelName]; ok {
  					variableLabelVals = append(variableLabelVals, val)
  				} else {
  					variableLabelVals = append(variableLabelVals, "")
  				}
  			}
  
  			val, err := coerceToFloat(dpLabels.datapoint.Value)
  			if err != nil {
  				promLog.Debugf("Bad datapoint value %q: (%s) %s", dpLabels.datapoint.Value, dpLabels.datapoint.Name, err)
  				continue
  			}
  
  			metric, err := prometheus.NewConstMetric(desc, prometheus.GaugeValue, val, variableLabelVals...)
  			if err != nil {
  				promLog.Warnf("Could not create Prometheus metric %s: %s", name, err)
  				continue
  			}
  
  			promLog.Debugf("Emitting datapoint %s", name)
  			ch <- metric
  		}
  	}
  }
docs: // Collect iterates over all the metrics available in the store, converting
  // them to prometheus.Metric and passing them into the prometheus producer
  // channel, where they will be served to consumers.