mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 02:07:58 +00:00
Changed the timestamp without testing
This commit is contained in:
parent
b03cc3e7c8
commit
80df37b920
1 changed files with 13 additions and 1 deletions
|
|
@ -98,8 +98,20 @@ func (p *prometheusProvider) metricFor(value pmodel.SampleValue, name types.Name
|
||||||
Metric: custom_metrics.MetricIdentifier{
|
Metric: custom_metrics.MetricIdentifier{
|
||||||
Name: info.Metric,
|
Name: info.Metric,
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO(directxman12): use the right timestamp
|
// 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,
|
Value: *q,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue