NewMetricWithTimestamp returns a new Metric wrapping the provided Metric in a way that it has an explicit timestamp set to the provided Time. This is only useful in rare cases as the timestamp of a Prometheus metric should usually be set by the Prometheus server during scraping. Exceptions include m
(t time.Time, m Metric)
| 168 | // millisecond resolution. Thus, the provided time will be rounded down to the |
| 169 | // next full millisecond value. |
| 170 | func NewMetricWithTimestamp(t time.Time, m Metric) Metric { |
| 171 | return timestampedMetric{Metric: m, t: t} |
| 172 | } |
| 173 | |
| 174 | type withExemplarsMetric struct { |
| 175 | Metric |
no outgoing calls