github.com/newrelic/go-agent@v3.26.0+incompatible/internal/custom_metric.go (about)

     1  // Copyright 2020 New Relic Corporation. All rights reserved.
     2  // SPDX-License-Identifier: Apache-2.0
     3  
     4  package internal
     5  
     6  // CustomMetric is a custom metric.
     7  type CustomMetric struct {
     8  	RawInputName string
     9  	Value        float64
    10  }
    11  
    12  // MergeIntoHarvest implements Harvestable.
    13  func (m CustomMetric) MergeIntoHarvest(h *Harvest) {
    14  	h.Metrics.addValue(customMetric(m.RawInputName), "", m.Value, unforced)
    15  }