mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-05 13:47:10 +02:00
Merge pull request #16914 from dashpole/simplify_target
Simplify target_info addition in the otlptranslator
This commit is contained in:
commit
ff3882fd35
@ -684,12 +684,10 @@ func addResourceTargetInfo(resource pcommon.Resource, settings Settings, earlies
|
||||
Timestamp: timestamp.UnixMilli(),
|
||||
})
|
||||
}
|
||||
if len(ts.Samples) == 0 || ts.Samples[len(ts.Samples)-1].Timestamp < latestTimestamp.UnixMilli() {
|
||||
ts.Samples = append(ts.Samples, prompb.Sample{
|
||||
Value: float64(1),
|
||||
Timestamp: latestTimestamp.UnixMilli(),
|
||||
})
|
||||
}
|
||||
ts.Samples = append(ts.Samples, prompb.Sample{
|
||||
Value: float64(1),
|
||||
Timestamp: latestTimestamp.UnixMilli(),
|
||||
})
|
||||
}
|
||||
|
||||
// convertTimeStamp converts OTLP timestamp in ns to timestamp in ms.
|
||||
|
Loading…
Reference in New Issue
Block a user