prometheus/prompb
beorn7 87351f2318 prompb: Modify layout of histograms
Note: This is deliberately an incompatible change. Since we have never
used histograms in remote read/write yet, there is no point in keeping
compatibility. This _is_, however, compatible to the state in the main
branch.

This commit flattens the bucket message into top-level fields. This
has the disadvantage of now having two triples of fields prefixed with
`negative_...` or `positive_...`. However, with this structure, we
save one tag on the wire. And, perhaps more importantly, we mirror the
structure of the `histogram.Histogram` Go type.

This commit also adjusts `repeated` fields to use names in the plural
form, as it is also the case for the fields that already existed.

This also adds a doc comment to `HistogramProtoToHistogram` and
changes its return type to a pointer (which is more convenient and
probably more efficient).

Signed-off-by: beorn7 <beorn@grafana.com>
2022-07-14 17:47:17 +02:00
..
io/prometheus/client prompb: Update exposition protobuf to include float and gauge histograms 2022-06-29 18:49:58 +02:00
buf.lock add support for buf (#10112) 2022-02-16 18:30:10 +01:00
buf.yaml prompb: add lint ignores for metrics.proto 2022-06-14 13:47:09 +02:00
custom.go tsdb: Added ChunkQueryable implementations to db; unified MergeSeriesSets and vertical to single struct. (#7069) 2020-07-31 16:03:02 +01:00
README.md update the protoc version to 3.12.3 in readme.md (#7931) 2020-09-14 09:08:27 +01:00
remote.pb.go prompb: Add histograms to remote write/read protobufs 2022-06-29 18:01:12 +02:00
remote.proto prompb: Add histograms to remote write/read protobufs 2022-06-29 18:01:12 +02:00
types.pb.go prompb: Modify layout of histograms 2022-07-14 17:47:17 +02:00
types.proto prompb: Modify layout of histograms 2022-07-14 17:47:17 +02:00

The compiled protobufs are version controlled and you won't normally need to re-compile them when building Prometheus.

If however you have modified the defs and do need to re-compile, run make proto from the parent dir.

In order for the script to run, you'll need protoc (version 3.12.3) in your PATH.