feat: document CreatedTimestamp func

Signed-off-by: Manik Rana <manikrana54@gmail.com>
This commit is contained in:
Manik Rana 2024-07-10 10:06:26 +05:30
parent 63a7ee22cd
commit f62664a8e9

View file

@ -226,8 +226,8 @@ func (p *OpenMetricsParser) Exemplar(e *exemplar.Exemplar) bool {
return true
}
// CreatedTimestamp returns nil as it's not implemented yet.
// TODO(bwplotka): https://github.com/prometheus/prometheus/issues/12980
// CreatedTimestamp returns the created timestamp as *int64 of a given Metric.
// It searches for the _created line of a given metric and uses an ephemeral createdTimestampParser to peek ahead and find the _created line.
func (p *OpenMetricsParser) CreatedTimestamp() *int64 {
var lbs labels.Labels
p.Metric(&lbs)