code: func messageToPromText(message producers.MetricsMessage) string {
  	var buffer bytes.Buffer
  
  	for _, d := range message.Datapoints {
  		name := sanitizeName(d.Name)
  		labels := getLabelsForDatapoint(message.Dimensions, d.Tags)
  		t, err := time.Parse(time.RFC3339, d.Timestamp)
  		if err != nil {
  			log.Warnf("Encountered bad timestamp, %q: %s", d.Timestamp, err)
  			continue
  		}
  		timestampMs := int(t.UnixNano() / 1000000)
  		buffer.WriteString(fmt.Sprintf("%s%s %v %d\n", name, labels, d.Value, timestampMs))
  	}
  
  	return buffer.String()
  }
docs: // messageToPromText converts a single metrics message to prometheus-formatted
  // newline-separate strings