github.com/lulzWill/go-agent@v2.1.2+incompatible/internal/custom_metric.go (about)

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