(newMetric pmetric.Metric, attributes map[string]any, samples []prompb.Sample)
| 220 | } |
| 221 | |
| 222 | func createDataPointsGauge(newMetric pmetric.Metric, attributes map[string]any, samples []prompb.Sample) { |
| 223 | newMetric.SetEmptyGauge() |
| 224 | for _, sample := range samples { |
| 225 | datapoint := newMetric.Gauge().DataPoints().AppendEmpty() |
| 226 | datapoint.SetDoubleValue(sample.Value) |
| 227 | datapoint.SetTimestamp(pcommon.Timestamp(sample.Timestamp * time.Millisecond.Nanoseconds())) |
| 228 | err := datapoint.Attributes().FromRaw(attributes) |
| 229 | if err != nil { |
| 230 | panic(err) |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | func createDataPointsExponentialHistogram(newMetric pmetric.Metric, attributes map[string]any, histograms []prompb.Histogram) { |
| 236 | newMetric.SetEmptyExponentialHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) |
no test coverage detected