From 80df37b920e8e962526d4c2c67c8ae6cd277ef9c Mon Sep 17 00:00:00 2001 From: impact-maker Date: Tue, 3 Jan 2023 12:08:40 +0530 Subject: [PATCH] Changed the timestamp without testing --- pkg/custom-provider/provider.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/custom-provider/provider.go b/pkg/custom-provider/provider.go index 989042d5..8061d9ca 100644 --- a/pkg/custom-provider/provider.go +++ b/pkg/custom-provider/provider.go @@ -98,8 +98,20 @@ func (p *prometheusProvider) metricFor(value pmodel.SampleValue, name types.Name Metric: custom_metrics.MetricIdentifier{ Name: info.Metric, }, + // TODO(directxman12): use the right timestamp - Timestamp: metav1.Time{Time: time.Now()}, + + + /*Making the changes in the timestamp as per issue + number #545*/ + + // Previously set timestamp + //Timestamp: metav1.Time{Time: time.Now()}, + + // Newly set timestamp + Timestamp: metav1.Time{ + Time: value.Timestamp.Time(), + }, Value: *q, }