mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
pkg/custom-provider: refactor MetricValue signature
This commit is contained in:
parent
f18b6fd370
commit
604208ef4f
1 changed files with 3 additions and 1 deletions
|
|
@ -85,7 +85,9 @@ func (p *prometheusProvider) metricFor(value pmodel.SampleValue, name types.Name
|
|||
|
||||
return &custom_metrics.MetricValue{
|
||||
DescribedObject: ref,
|
||||
MetricName: info.Metric,
|
||||
Metric: custom_metrics.MetricIdentifier{
|
||||
Name: info.Metric,
|
||||
},
|
||||
// TODO(directxman12): use the right timestamp
|
||||
Timestamp: metav1.Time{time.Now()},
|
||||
Value: *resource.NewMilliQuantity(int64(value*1000.0), resource.DecimalSI),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue