custom_metric.go 299 B

123456789101112
  1. package internal
  2. // CustomMetric is a custom metric.
  3. type CustomMetric struct {
  4. RawInputName string
  5. Value float64
  6. }
  7. // MergeIntoHarvest implements Harvestable.
  8. func (m CustomMetric) MergeIntoHarvest(h *Harvest) {
  9. h.Metrics.addValue(customMetric(m.RawInputName), "", m.Value, unforced)
  10. }