mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 06:29:42 -08:00
Merge pull request #1098 from prometheus/fix-direct-access-of-protobuf-fields
Fix creation of protobuf fields
This commit is contained in:
commit
cf12e890a6
|
@ -95,8 +95,8 @@ func (h *Handler) federation(w http.ResponseWriter, req *http.Request) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protMetric.TimestampMs = (*int64)(&sp.Timestamp)
|
protMetric.TimestampMs = proto.Int64(int64(sp.Timestamp))
|
||||||
protMetric.Untyped.Value = (*float64)(&sp.Value)
|
protMetric.Untyped.Value = proto.Float64(float64(sp.Value))
|
||||||
|
|
||||||
if err := enc.Encode(protMetricFam); err != nil {
|
if err := enc.Encode(protMetricFam); err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
|
Loading…
Reference in a new issue