Skip to content

Commit

Permalink
Merge pull request prometheus#1098 from prometheus/fix-direct-access-…
Browse files Browse the repository at this point in the history
…of-protobuf-fields

Fix creation of protobuf fields
  • Loading branch information
beorn7 committed Sep 21, 2015
2 parents 7c0a496 + ca63c05 commit cf12e89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/federate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cf12e89

Please sign in to comment.