mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 00:23:18 +00:00
Fix creation of protobuf fields
This commit is contained in:
parent
7ea867b4c9
commit
ca63c05b4e
@ -95,8 +95,8 @@ func (h *Handler) federation(w http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
protMetric.TimestampMs = (*int64)(&sp.Timestamp)
|
||||
protMetric.Untyped.Value = (*float64)(&sp.Value)
|
||||
protMetric.TimestampMs = proto.Int64(int64(sp.Timestamp))
|
||||
protMetric.Untyped.Value = proto.Float64(float64(sp.Value))
|
||||
|
||||
if err := enc.Encode(protMetricFam); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
|
Loading…
Reference in New Issue
Block a user