-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sidecar, query, receiver: Native histogram support #6032
Conversation
831ee0c
to
67a4190
Compare
5e05fb2
to
29fdb83
Compare
29fdb83
to
0d35f4a
Compare
57c9771
to
8edbf72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks. Just one comment from my side
pkg/query/querier_test.go
Outdated
@@ -843,7 +843,6 @@ func (s *mockedSeriesIterator) At() (t int64, v float64) { | |||
return sample.t, sample.v | |||
} | |||
|
|||
// TODO(rabenhorst): Needs to be implemented for native histogram support. | |||
func (s *mockedSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we still panic in this method but removed the comment. Do we still need to implement anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will restore the comment. Rn mockedSeriesIterator
does not support histograms and if we need it it needs to be implemented.
I updated prometheus/common so that it includes prometheus/common#417, which is not tagged yet but helps to improve tests (see last commit). |
c938a32
to
ca26c93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good now 👍
ca26c93
to
d61405a
Compare
e3347d6
to
dc81061
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a nit
lastUseA := it.useA | ||
defer func() { | ||
if it.useA != lastUseA { | ||
if it.useA != lastUseA && isFloatVal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjustAtValue
seems to already be protected against doing something with non-float values but this makes code clearer 👍
204b20d
to
4109b40
Compare
Signed-off-by: Sebastian Rabenhorst <[email protected]> Added comment Signed-off-by: Sebastian Rabenhorst <[email protected]> Cleanup native histogram tests Signed-off-by: Sebastian Rabenhorst <[email protected]> Made native hist test ha and replace usage of at with att Signed-off-by: Sebastian Rabenhorst <[email protected]> Fix deduplication with native histograms Signed-off-by: Sebastian Rabenhorst <[email protected]> Enabled native histogram writing Signed-off-by: Sebastian Rabenhorst <[email protected]> Committed missing files for write Signed-off-by: Sebastian Rabenhorst <[email protected]> Added benchmark for histogram writing Signed-off-by: Sebastian Rabenhorst <[email protected]> Fixed chunkSeriesIterator Signed-off-by: Sebastian Rabenhorst <[email protected]> Enabled replication for native histogram write test Signed-off-by: Sebastian Rabenhorst <[email protected]> Lint native histogram test imports Signed-off-by: Sebastian Rabenhorst <[email protected]> Removed ToDo comments Signed-off-by: Sebastian Rabenhorst <[email protected]> Cleanup Signed-off-by: Sebastian Rabenhorst <[email protected]>
Signed-off-by: Sebastian Rabenhorst <[email protected]>
Signed-off-by: Sebastian Rabenhorst <[email protected]>
Signed-off-by: Sebastian Rabenhorst <[email protected]>
Signed-off-by: Sebastian Rabenhorst <[email protected]>
Signed-off-by: Sebastian Rabenhorst <[email protected]>
Signed-off-by: Sebastian Rabenhorst <[email protected]>
Signed-off-by: Sebastian Rabenhorst <[email protected]>
4b432ea
to
6bc4626
Compare
* Added native histogram support for sidecar, query, receiver. Signed-off-by: Sebastian Rabenhorst <[email protected]> Added comment Signed-off-by: Sebastian Rabenhorst <[email protected]> Cleanup native histogram tests Signed-off-by: Sebastian Rabenhorst <[email protected]> Made native hist test ha and replace usage of at with att Signed-off-by: Sebastian Rabenhorst <[email protected]> Fix deduplication with native histograms Signed-off-by: Sebastian Rabenhorst <[email protected]> Enabled native histogram writing Signed-off-by: Sebastian Rabenhorst <[email protected]> Committed missing files for write Signed-off-by: Sebastian Rabenhorst <[email protected]> Added benchmark for histogram writing Signed-off-by: Sebastian Rabenhorst <[email protected]> Fixed chunkSeriesIterator Signed-off-by: Sebastian Rabenhorst <[email protected]> Enabled replication for native histogram write test Signed-off-by: Sebastian Rabenhorst <[email protected]> Lint native histogram test imports Signed-off-by: Sebastian Rabenhorst <[email protected]> Removed ToDo comments Signed-off-by: Sebastian Rabenhorst <[email protected]> Cleanup Signed-off-by: Sebastian Rabenhorst <[email protected]> * Renamed lastValue of dedup iter and added TODO Signed-off-by: Sebastian Rabenhorst <[email protected]> * Fixed typo Signed-off-by: Sebastian Rabenhorst <[email protected]> * Added hidden native histogram flag for receive tsdb Signed-off-by: Sebastian Rabenhorst <[email protected]> * merge Signed-off-by: Sebastian Rabenhorst <[email protected]> * Comments and reverted change to qfe Signed-off-by: Sebastian Rabenhorst <[email protected]> * Go mod tidy Signed-off-by: Sebastian Rabenhorst <[email protected]> * Dedup iter nit Signed-off-by: Sebastian Rabenhorst <[email protected]> Signed-off-by: Sebastian Rabenhorst <[email protected]>
* Added native histogram support for sidecar, query, receiver. Signed-off-by: Sebastian Rabenhorst <[email protected]> Added comment Signed-off-by: Sebastian Rabenhorst <[email protected]> Cleanup native histogram tests Signed-off-by: Sebastian Rabenhorst <[email protected]> Made native hist test ha and replace usage of at with att Signed-off-by: Sebastian Rabenhorst <[email protected]> Fix deduplication with native histograms Signed-off-by: Sebastian Rabenhorst <[email protected]> Enabled native histogram writing Signed-off-by: Sebastian Rabenhorst <[email protected]> Committed missing files for write Signed-off-by: Sebastian Rabenhorst <[email protected]> Added benchmark for histogram writing Signed-off-by: Sebastian Rabenhorst <[email protected]> Fixed chunkSeriesIterator Signed-off-by: Sebastian Rabenhorst <[email protected]> Enabled replication for native histogram write test Signed-off-by: Sebastian Rabenhorst <[email protected]> Lint native histogram test imports Signed-off-by: Sebastian Rabenhorst <[email protected]> Removed ToDo comments Signed-off-by: Sebastian Rabenhorst <[email protected]> Cleanup Signed-off-by: Sebastian Rabenhorst <[email protected]> * Renamed lastValue of dedup iter and added TODO Signed-off-by: Sebastian Rabenhorst <[email protected]> * Fixed typo Signed-off-by: Sebastian Rabenhorst <[email protected]> * Added hidden native histogram flag for receive tsdb Signed-off-by: Sebastian Rabenhorst <[email protected]> * merge Signed-off-by: Sebastian Rabenhorst <[email protected]> * Comments and reverted change to qfe Signed-off-by: Sebastian Rabenhorst <[email protected]> * Go mod tidy Signed-off-by: Sebastian Rabenhorst <[email protected]> * Dedup iter nit Signed-off-by: Sebastian Rabenhorst <[email protected]> Signed-off-by: Sebastian Rabenhorst <[email protected]>
* Added native histogram support for sidecar, query, receiver. Signed-off-by: Sebastian Rabenhorst <[email protected]> Added comment Signed-off-by: Sebastian Rabenhorst <[email protected]> Cleanup native histogram tests Signed-off-by: Sebastian Rabenhorst <[email protected]> Made native hist test ha and replace usage of at with att Signed-off-by: Sebastian Rabenhorst <[email protected]> Fix deduplication with native histograms Signed-off-by: Sebastian Rabenhorst <[email protected]> Enabled native histogram writing Signed-off-by: Sebastian Rabenhorst <[email protected]> Committed missing files for write Signed-off-by: Sebastian Rabenhorst <[email protected]> Added benchmark for histogram writing Signed-off-by: Sebastian Rabenhorst <[email protected]> Fixed chunkSeriesIterator Signed-off-by: Sebastian Rabenhorst <[email protected]> Enabled replication for native histogram write test Signed-off-by: Sebastian Rabenhorst <[email protected]> Lint native histogram test imports Signed-off-by: Sebastian Rabenhorst <[email protected]> Removed ToDo comments Signed-off-by: Sebastian Rabenhorst <[email protected]> Cleanup Signed-off-by: Sebastian Rabenhorst <[email protected]> * Renamed lastValue of dedup iter and added TODO Signed-off-by: Sebastian Rabenhorst <[email protected]> * Fixed typo Signed-off-by: Sebastian Rabenhorst <[email protected]> * Added hidden native histogram flag for receive tsdb Signed-off-by: Sebastian Rabenhorst <[email protected]> * merge Signed-off-by: Sebastian Rabenhorst <[email protected]> * Comments and reverted change to qfe Signed-off-by: Sebastian Rabenhorst <[email protected]> * Go mod tidy Signed-off-by: Sebastian Rabenhorst <[email protected]> * Dedup iter nit Signed-off-by: Sebastian Rabenhorst <[email protected]> Signed-off-by: Sebastian Rabenhorst <[email protected]>
Add native histogram support for sidecar, query, receiver. It does not include necessary changes for query UI and query frontend. The plan is to do this separate PRs. Relates to #5907.
Changes
Verification
QueryInstant
of promclient as workaround (until Add histogram vectors to model prometheus/common#417 is available)