Nicolás Pazos
175bd212cc
make proto
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-21 13:41:18 -03:00
Nicolás Pazos
fe41ed9067
rename new proto types and move to separate pkg
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-21 11:40:36 -03:00
Nicolás Pazos
38c444b942
lint
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-21 10:08:15 -03:00
Nicolás Pazos
48f9285b11
define separate proto types for remote write 2.0
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-21 09:59:52 -03:00
Nicolás Pazos
83325af699
fix custom marshaling
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:29 -03:00
Nicolás Pazos
5aab80a71c
don't reserve field 3 for new proto and add TODO
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:29 -03:00
Nicolás Pazos
ec9300fc1a
remove all new rw formats but the []string one
...
also adapt tests to the new format
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:29 -03:00
Nicolás Pazos
31d3956f47
new interning format based on []string indeces
...
Co-authored-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:29 -03:00
Callum Styan
ba53225efb
use require instead of assert in custom marshal test
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:11 -03:00
Callum Styan
4bdb73780c
remove more format types we probably won't use
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:11 -03:00
Callum Styan
81c0d78ad4
remove formats we've decided not to use
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:11 -03:00
Callum Styan
97d0556584
test additional len and lenbytes formats
...
Co-authored-by: Nicolás Pazos <npazosmendez@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:11 -03:00
Callum Styan
8b0cda8bb3
Add bytes slice (instead of slice of 32bit vars) format for testing
...
Co-authored-by: Nicolás Pazos <npazosmendez@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:11 -03:00
Callum Styan
a9ca52d062
use exp slices for backwards compat. to go 1.20 plus add copyright
...
header to test file
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:11 -03:00
Callum Styan
23c7936cee
refactor new version flag to make it easier to pick a specific format
...
instead of having multiple flags, plus add new formats for testing
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:29:11 -03:00
Nicolás Pazos
8426752e0f
remove all code from previous interning approach
...
the 'minimized' version is now the only v1.1 version
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:27:54 -03:00
Nicolás Pazos
5dbe3c1919
manually optimize varint marshaling
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:27:54 -03:00
Nicolás Pazos
0584610080
Use two uint32 to encode (offset,leng)
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:27:54 -03:00
Callum Styan
2eac37aea6
remove unused proto type
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:27:54 -03:00
Nicolás Pazos
06476d5172
Make LabelSymbols a fixed32
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:27:54 -03:00
Callum Styan
8aadbfb372
Add minmized remote write proto format
...
Co-authored-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:27:54 -03:00
alexgreenbank
3f33175e0b
Remove config, update proto
...
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:27:54 -03:00
Callum Styan
1ac2950144
add new proto types
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
2023-12-19 14:27:09 -03:00
Arianna Vespri
ffcc8a64a9
Add unit to metric family protobuf message
...
Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
2023-12-07 14:13:20 +01:00
beorn7
0eb0ca42c5
Update “conventional histogram” → “classic histogram”
...
Signed-off-by: beorn7 <beorn@grafana.com>
2023-11-29 15:22:58 +01:00
beorn7
a5abd92541
prompb: Remove gogoproto.nullable) = true]
from created_timestamp
...
In proto3, this doesn't change anything. However, since the
`CreatedTimestamp` field is generated as a pointer
(`*types.Timestamp`), we are still able to detect the unset state.
(This is in contrast to the `timestamp_ms` field, which is a plain
int64, for which we cannot enforce generation as a pointer, see
comment updated in the previous commit for future actions.)
Signed-off-by: beorn7 <beorn@grafana.com>
2023-10-19 17:59:07 +02:00
Arthur Silva Sens
4b9c19fe55
Add created timestamps to prompb ( #12936 )
...
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-10-10 08:54:49 +01:00
beorn7
c58e20ad0e
histogram: Identify native histograms even without observations
...
Native histograms without observations and with a zero threshold of
zero look the same as classic histograms in the protobuf exposition
format. According to
https://github.com/prometheus/client_golang/issues/1127 , the idea is
to add a no-op span to those histograms to mark them as native
histograms. This commit enables Prometheus to detect that no-op span
and adds a doc comment to the proto spec describing the behavior.
Signed-off-by: beorn7 <beorn@grafana.com>
2023-07-26 17:42:30 +02:00
Paschalis Tsilias
8a34c43515
Update prompb/README.md
...
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2023-04-26 12:57:20 +03:00
Paschalis Tsilias
55626c6911
Fix final newline
...
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-26 12:44:15 +03:00
Paschalis Tsilias
93f64754c0
Remove extra line
...
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-26 12:43:19 +03:00
Paschalis Tsilias
417e847662
Update prompb/README.md
...
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2023-04-25 17:17:22 +03:00
Paschalis Tsilias
c06c02b3b1
Fix recommended protoc version
...
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-25 16:27:39 +03:00
Jeanette Tan
e9a1e26ab7
Perform integer/float histogram type checking on conversions, and use a consistent method for determining integer vs float histogram
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 02:27:15 +08:00
Justin Lei
c16b6a0185
Handle native histograms in remote read
...
Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-03-09 09:13:53 -08:00
Ganesh Vernekar
36b04efc7b
Merge pull request #11947 from prometheus/beorn7/protobuf
...
protobuf: Mark repeated fields as non-nullable
2023-02-09 12:43:32 +05:30
beorn7
1dd53843b6
protobuf: Mark repeated fields as non-nullable
...
Inspired by #11935 , we can do it here, too.
Also, clean up indentation.
Signed-off-by: beorn7 <beorn@grafana.com>
2023-02-07 15:02:03 +01:00
Charles Korn
0a1de58f7e
Mark Histogram.(Positive|Negative)Spans as non-nullable.
...
As far as I understand it, we'd never expect to receive a nil span,
and remote.spansProtoToSpans would panic if we received a nil span.
Marking the fields as non-nullable also means the generated Golang
code doesn't use pointers for these fields, reducing allocations.
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-02-03 13:49:22 +11:00
Giedrius Statkevičius
d1d2566055
remote/read_handler: pool input to Marshal() ( #11357 )
...
* remote/read_handler: pool input to Marshal()
Use a sync.Pool to reuse byte slices between calls to Marshal() in the
remote read handler.
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
* remote: add microbenchmark for remote read handler
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2022-11-15 16:29:16 +01:00
Ganesh Vernekar
bde500e690
Merge pull request #11420 from jesusvazquez/jvp/update-sparsehistogram-with-main-v2
...
Merge branch 'main' into sparsehistogram
2022-10-12 11:45:50 +05:30
Ganesh Vernekar
507bfa46fd
Fix HistogramChunk's AtFloatHistogram()
...
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-10-12 10:38:13 +05:30
beorn7
430bdc9dd0
prompb: Add note about experimental state of native histograms
...
Signed-off-by: beorn7 <beorn@grafana.com>
2022-10-11 14:08:40 +02:00
beorn7
c40b105efd
histograms: Move to new exposition protobuf format
...
This is an incompatible protobuf change. Instrumented targets must
include https://github.com/prometheus/client_golang/pull/1092 to make
this work.
Signed-off-by: beorn7 <beorn@grafana.com>
2022-07-19 18:11:33 +02:00
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
beorn7
d758198e37
prompb: Update exposition protobuf to include float and gauge histograms
...
Signed-off-by: beorn7 <beorn@grafana.com>
2022-06-29 18:49:58 +02:00
beorn7
d9d51c565c
prompb: Add histograms to remote write/read protobufs
...
Signed-off-by: beorn7 <beorn@grafana.com>
2022-06-29 18:01:12 +02:00
beorn7
fb92a801f6
prompb: add lint ignores for metrics.proto
...
Signed-off-by: beorn7 <beorn@grafana.com>
2022-06-14 13:47:09 +02:00
beorn7
3bc711e333
Merge branch 'main' into sparsehistogram
2022-05-04 13:37:13 +02:00
Paschalis Tsilias
4deb1a90d2
Amend Protobuf docstrings referring to model/ packages
...
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2022-04-16 00:37:16 +02:00
beorn7
4210aac74a
Merge branch 'main' into sparsehistogram
2022-03-22 14:47:42 +01:00