Skip to content
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

Add support for native histograms in querier protobuf codec #6368

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

afhassan
Copy link
Contributor

What this PR does:
The current implementation of querier protobuf codec does not serialize prometheus native histograms. This PR allows querier protobuf codec to handle responses with native histograms.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integration test is the same but runs twice now for each of the two querier codec flags

Sample: &cortexpb.Sample{
vectorSamples[i].Labels = labels

if data.Result.(promql.Vector)[i].H != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the json_codec implementation we cannot have both a histogram and float at the same time for a vector sample

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Just some small nits

pkg/querier/codec/protobuf_codec.go Outdated Show resolved Hide resolved
pkg/querier/codec/protobuf_codec.go Outdated Show resolved Hide resolved
pkg/querier/codec/protobuf_codec_test.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants