diff --git a/pkg/api/handlers.go b/pkg/api/handlers.go index 039b9c052f..af9d1d539c 100644 --- a/pkg/api/handlers.go +++ b/pkg/api/handlers.go @@ -233,7 +233,9 @@ func NewQuerierHandler( ) // JSON codec is already installed. Install Protobuf codec to give the option for using either. - api.InstallCodec(codec.ProtobufCodec{}) + api.InstallCodec(codec.ProtobufCodec{CortexInternal: false}) + // Protobuf codec for Cortex internal requests. This should be used by Cortex Ruler only for remote evaluation. + api.InstallCodec(codec.ProtobufCodec{CortexInternal: true}) router := mux.NewRouter() diff --git a/pkg/querier/codec/protobuf_codec.go b/pkg/querier/codec/protobuf_codec.go index 78b1d7c58a..2544499b9c 100644 --- a/pkg/querier/codec/protobuf_codec.go +++ b/pkg/querier/codec/protobuf_codec.go @@ -13,10 +13,20 @@ import ( "github.com/cortexproject/cortex/pkg/querier/tripperware" ) -type ProtobufCodec struct{} +type ProtobufCodec struct { + // cortexInternal enables encoding the whole native histogram data fields in response instead of keeping + // only few sparse information like the default JSON/Protobuf codec does. + // This will be used by Cortex Ruler to get native histograms data from Cortex Query Frontend because + // rule evaluation requires the full native histogram data. + CortexInternal bool +} func (p ProtobufCodec) ContentType() v1.MIMEType { - return v1.MIMEType{Type: "application", SubType: "x-protobuf"} + if !p.CortexInternal { + return v1.MIMEType{Type: "application", SubType: "x-protobuf"} + } + // TODO: switch to use constants. + return v1.MIMEType{Type: "application", SubType: "x-cortex-query+proto"} } func (p ProtobufCodec) CanEncode(resp *v1.Response) bool { @@ -29,7 +39,7 @@ func (p ProtobufCodec) CanEncode(resp *v1.Response) bool { // ProtobufCodec implementation is derived from https://github.com/prometheus/prometheus/blob/main/web/api/v1/json_codec.go func (p ProtobufCodec) Encode(resp *v1.Response) ([]byte, error) { - prometheusQueryResponse, err := createPrometheusQueryResponse(resp) + prometheusQueryResponse, err := createPrometheusQueryResponse(resp, p.CortexInternal) if err != nil { return []byte{}, err } @@ -37,7 +47,7 @@ func (p ProtobufCodec) Encode(resp *v1.Response) ([]byte, error) { return b, err } -func createPrometheusQueryResponse(resp *v1.Response) (*tripperware.PrometheusResponse, error) { +func createPrometheusQueryResponse(resp *v1.Response, cortexInternal bool) (*tripperware.PrometheusResponse, error) { var data = resp.Data.(*v1.QueryData) var queryResult tripperware.PrometheusQueryResult @@ -51,7 +61,10 @@ func createPrometheusQueryResponse(resp *v1.Response) (*tripperware.PrometheusRe case model.ValVector.String(): queryResult.Result = &tripperware.PrometheusQueryResult_Vector{ Vector: &tripperware.Vector{ - Samples: *getVectorSamples(data), + // cortexInternal tries to encode native histogram as dense format instead of sparse format. + // This is only used for vector response type since internal response is only available for Ruler + // client and Ruler only expects vector or scalar response type. + Samples: *getVectorSamples(data, cortexInternal), }, } default: @@ -139,7 +152,7 @@ func getMatrixSampleStreams(data *v1.QueryData) *[]tripperware.SampleStream { return &sampleStreams } -func getVectorSamples(data *v1.QueryData) *[]tripperware.Sample { +func getVectorSamples(data *v1.QueryData, cortexInternal bool) *[]tripperware.Sample { vectorSamplesLen := len(data.Result.(promql.Vector)) vectorSamples := make([]tripperware.Sample, vectorSamplesLen) @@ -158,27 +171,37 @@ func getVectorSamples(data *v1.QueryData) *[]tripperware.Sample { } vectorSamples[i].Labels = labels - if sample.H != nil { - bucketsLen := len(sample.H.NegativeBuckets) + len(sample.H.PositiveBuckets) - if sample.H.ZeroCount > 0 { - bucketsLen = len(sample.H.NegativeBuckets) + len(sample.H.PositiveBuckets) + 1 - } - buckets := make([]*tripperware.HistogramBucket, bucketsLen) - it := sample.H.AllBucketIterator() - getBuckets(buckets, it) - vectorSamples[i].Histogram = &tripperware.SampleHistogramPair{ - TimestampMs: sample.T, - Histogram: tripperware.SampleHistogram{ - Count: sample.H.Count, - Sum: sample.H.Sum, - Buckets: buckets, - }, - } - } else { + // Float samples only. + if sample.H == nil { vectorSamples[i].Sample = &cortexpb.Sample{ TimestampMs: sample.T, Value: sample.F, } + continue + } + + // Cortex Internal request. Encode dense float native histograms. + if cortexInternal { + hp := cortexpb.FloatHistogramToHistogramProto(sample.T, sample.H) + vectorSamples[i].RawHistogram = &hp + continue + } + + // Encode sparse native histograms. + bucketsLen := len(sample.H.NegativeBuckets) + len(sample.H.PositiveBuckets) + if sample.H.ZeroCount > 0 { + bucketsLen = len(sample.H.NegativeBuckets) + len(sample.H.PositiveBuckets) + 1 + } + buckets := make([]*tripperware.HistogramBucket, bucketsLen) + it := sample.H.AllBucketIterator() + getBuckets(buckets, it) + vectorSamples[i].Histogram = &tripperware.SampleHistogramPair{ + TimestampMs: sample.T, + Histogram: tripperware.SampleHistogram{ + Count: sample.H.Count, + Sum: sample.H.Sum, + Buckets: buckets, + }, } } return &vectorSamples diff --git a/pkg/querier/codec/protobuf_codec_test.go b/pkg/querier/codec/protobuf_codec_test.go index 54fa561fd5..310e49b392 100644 --- a/pkg/querier/codec/protobuf_codec_test.go +++ b/pkg/querier/codec/protobuf_codec_test.go @@ -17,9 +17,29 @@ import ( ) func TestProtobufCodec_Encode(t *testing.T) { + testFloatHistogram := &histogram.FloatHistogram{ + Schema: 2, + ZeroThreshold: 0.001, + ZeroCount: 12, + Count: 10, + Sum: 20, + PositiveSpans: []histogram.Span{ + {Offset: 3, Length: 2}, + {Offset: 1, Length: 3}, + }, + NegativeSpans: []histogram.Span{ + {Offset: 2, Length: 2}, + }, + PositiveBuckets: []float64{1, 2, 2, 1, 1}, + NegativeBuckets: []float64{2, 1}, + } + testProtoHistogram := cortexpb.FloatHistogramToHistogramProto(1000, testFloatHistogram) + tests := []struct { - data interface{} - expected *tripperware.PrometheusResponse + name string + data *v1.QueryData + cortexInternal bool + expected *tripperware.PrometheusResponse }{ { data: &v1.QueryData{ @@ -207,23 +227,8 @@ func TestProtobufCodec_Encode(t *testing.T) { ResultType: parser.ValueTypeMatrix, Result: promql.Matrix{ promql.Series{ - Histograms: []promql.HPoint{{H: &histogram.FloatHistogram{ - Schema: 2, - ZeroThreshold: 0.001, - ZeroCount: 12, - Count: 10, - Sum: 20, - PositiveSpans: []histogram.Span{ - {Offset: 3, Length: 2}, - {Offset: 1, Length: 3}, - }, - NegativeSpans: []histogram.Span{ - {Offset: 2, Length: 2}, - }, - PositiveBuckets: []float64{1, 2, 2, 1, 1}, - NegativeBuckets: []float64{2, 1}, - }, T: 1000}}, - Metric: labels.FromStrings("__name__", "foo"), + Histograms: []promql.HPoint{{H: testFloatHistogram, T: 1000}}, + Metric: labels.FromStrings("__name__", "foo"), }, }, }, @@ -313,22 +318,7 @@ func TestProtobufCodec_Encode(t *testing.T) { promql.Sample{ Metric: labels.FromStrings("__name__", "foo"), T: 1000, - H: &histogram.FloatHistogram{ - Schema: 2, - ZeroThreshold: 0.001, - ZeroCount: 12, - Count: 10, - Sum: 20, - PositiveSpans: []histogram.Span{ - {Offset: 3, Length: 2}, - {Offset: 1, Length: 3}, - }, - NegativeSpans: []histogram.Span{ - {Offset: 2, Length: 2}, - }, - PositiveBuckets: []float64{1, 2, 2, 1, 1}, - NegativeBuckets: []float64{2, 1}, - }, + H: testFloatHistogram, }, }, }, @@ -409,17 +399,53 @@ func TestProtobufCodec_Encode(t *testing.T) { }, }, }, + { + name: "cortex internal with native histogram", + cortexInternal: true, + data: &v1.QueryData{ + ResultType: parser.ValueTypeVector, + Result: promql.Vector{ + promql.Sample{ + Metric: labels.FromStrings("__name__", "foo"), + T: 1000, + H: testFloatHistogram, + }, + }, + }, + expected: &tripperware.PrometheusResponse{ + Status: tripperware.StatusSuccess, + Data: tripperware.PrometheusData{ + ResultType: model.ValVector.String(), + Result: tripperware.PrometheusQueryResult{ + Result: &tripperware.PrometheusQueryResult_Vector{ + Vector: &tripperware.Vector{ + Samples: []tripperware.Sample{ + { + Labels: []cortexpb.LabelAdapter{ + {Name: "__name__", Value: "foo"}, + }, + RawHistogram: &testProtoHistogram, + }, + }, + }, + }, + }, + }, + }, + }, } - codec := ProtobufCodec{} for _, test := range tests { - body, err := codec.Encode(&v1.Response{ - Status: tripperware.StatusSuccess, - Data: test.data, + t.Run(test.name, func(t *testing.T) { + codec := ProtobufCodec{CortexInternal: test.cortexInternal} + body, err := codec.Encode(&v1.Response{ + Status: tripperware.StatusSuccess, + Data: test.data, + }) + require.NoError(t, err) + b, err := proto.Marshal(test.expected) + require.NoError(t, err) + require.Equal(t, string(b), string(body)) }) - require.NoError(t, err) - b, err := proto.Marshal(test.expected) - require.NoError(t, err) - require.Equal(t, string(b), string(body)) } } diff --git a/pkg/querier/tripperware/merge.go b/pkg/querier/tripperware/merge.go index a85725c541..0fd385cecf 100644 --- a/pkg/querier/tripperware/merge.go +++ b/pkg/querier/tripperware/merge.go @@ -400,7 +400,7 @@ func sliceSamples(samples []cortexpb.Sample, minTs int64) []cortexpb.Sample { return samples[searchResult:] } -// sliceHistogram assumes given histogram are sorted by timestamp in ascending order and +// sliceHistograms assumes given histogram are sorted by timestamp in ascending order and // return a sub slice whose first element's is the smallest timestamp that is strictly // bigger than the given minTs. Empty slice is returned if minTs is bigger than all the // timestamps in histogram. diff --git a/pkg/querier/tripperware/query.pb.go b/pkg/querier/tripperware/query.pb.go index 2e16fc9c6d..5b493380f8 100644 --- a/pkg/querier/tripperware/query.pb.go +++ b/pkg/querier/tripperware/query.pb.go @@ -881,6 +881,9 @@ type Sample struct { Labels []github_com_cortexproject_cortex_pkg_cortexpb.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter" json:"metric"` Sample *cortexpb.Sample `protobuf:"bytes,2,opt,name=sample,proto3" json:"value"` Histogram *SampleHistogramPair `protobuf:"bytes,3,opt,name=histogram,proto3" json:"histogram"` + // Full representation of a native histogram and it should be always float histogram type. + // This field should be never deserialized into JSON and should only exist in protobuf format. + RawHistogram *cortexpb.Histogram `protobuf:"bytes,4,opt,name=rawHistogram,proto3" json:"-"` } func (m *Sample) Reset() { *m = Sample{} } @@ -929,6 +932,13 @@ func (m *Sample) GetHistogram() *SampleHistogramPair { return nil } +func (m *Sample) GetRawHistogram() *cortexpb.Histogram { + if m != nil { + return m.RawHistogram + } + return nil +} + type Matrix struct { SampleStreams []SampleStream `protobuf:"bytes,1,rep,name=sampleStreams,proto3" json:"sampleStreams"` } @@ -994,83 +1004,85 @@ func init() { func init() { proto.RegisterFile("query.proto", fileDescriptor_5c6ac9b241082464) } var fileDescriptor_5c6ac9b241082464 = []byte{ - // 1208 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4b, 0x6f, 0x1b, 0x55, - 0x14, 0xf6, 0xf8, 0x31, 0x76, 0x8e, 0xd3, 0xa4, 0xdc, 0xf4, 0xe1, 0x94, 0x32, 0x63, 0x46, 0x20, - 0x05, 0x41, 0x1d, 0x91, 0x0a, 0x10, 0x20, 0x2a, 0x3a, 0x50, 0x48, 0x0b, 0xa5, 0xed, 0x4d, 0x55, - 0x24, 0x36, 0xd5, 0xb5, 0x7d, 0xeb, 0x0c, 0xf1, 0x3c, 0x7a, 0xe7, 0x4e, 0x13, 0xb3, 0x62, 0xcd, - 0x02, 0xb1, 0x46, 0x62, 0xc1, 0x8e, 0x05, 0x3f, 0x24, 0xcb, 0x2e, 0x2b, 0x24, 0x46, 0xd4, 0xd9, - 0xa0, 0x59, 0xf5, 0x27, 0xa0, 0xfb, 0x18, 0x7b, 0x9c, 0x38, 0x89, 0xba, 0x62, 0xe3, 0xcc, 0x39, - 0xe7, 0x3b, 0xcf, 0x7b, 0x1e, 0x81, 0xe6, 0xe3, 0x84, 0xb2, 0x51, 0x27, 0x62, 0x21, 0x0f, 0x51, - 0x93, 0x33, 0x2f, 0x8a, 0x28, 0xdb, 0x25, 0x8c, 0x5e, 0x3a, 0x37, 0x08, 0x07, 0xa1, 0xe4, 0xaf, - 0x8b, 0x2f, 0x05, 0xb9, 0x64, 0x0d, 0xc2, 0x70, 0x30, 0xa4, 0xeb, 0x92, 0xea, 0x26, 0x8f, 0xd6, - 0xfb, 0x09, 0x23, 0xdc, 0x0b, 0x03, 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c7, - 0x78, 0x35, 0x4b, 0xed, 0xf9, 0x00, 0x3c, 0x9f, 0x8d, 0x7e, 0x37, 0xe0, 0xf2, 0x5c, 0xc9, 0x5d, - 0xca, 0xb6, 0x38, 0x8d, 0x74, 0xbb, 0x7f, 0x7c, 0x4a, 0x76, 0x87, 0xb5, 0x65, 0xb4, 0xda, 0x84, - 0xdb, 0xce, 0x52, 0xfb, 0x44, 0x27, 0xf8, 0x44, 0x29, 0x7a, 0x17, 0x9a, 0x11, 0x25, 0x3b, 0x79, - 0xaa, 0x15, 0x99, 0xea, 0x72, 0x96, 0xda, 0x45, 0x36, 0x2e, 0x12, 0x8e, 0x07, 0x2f, 0x19, 0xa4, - 0xe8, 0x00, 0x39, 0xb8, 0x7a, 0x62, 0x14, 0x71, 0x64, 0x9c, 0xca, 0x47, 0xc6, 0xc9, 0xb9, 0x0f, - 0xad, 0xe3, 0x8e, 0x25, 0x5a, 0x85, 0xea, 0x37, 0xc4, 0xcf, 0x8f, 0x94, 0xde, 0x92, 0x92, 0x85, - 0x5e, 0x03, 0xf3, 0x81, 0x5c, 0x14, 0xb2, 0xc2, 0x13, 0xa1, 0x66, 0x3a, 0xbf, 0x19, 0x70, 0x7e, - 0xee, 0x69, 0x42, 0x57, 0xc0, 0x7c, 0x42, 0x7b, 0x3c, 0x64, 0xba, 0xf1, 0x66, 0x6f, 0xc0, 0x03, - 0x29, 0xda, 0x2c, 0x61, 0x0d, 0x42, 0x97, 0xa1, 0xc1, 0xc8, 0xae, 0x3b, 0xe2, 0x54, 0x45, 0xbf, - 0xb8, 0x59, 0xc2, 0x13, 0x8e, 0x30, 0xe6, 0x13, 0xce, 0xbc, 0x3d, 0x7d, 0xd0, 0x66, 0x8d, 0xdd, - 0x96, 0x22, 0x61, 0x4c, 0x81, 0xdc, 0x06, 0xe8, 0x83, 0xe8, 0x7c, 0x02, 0xa6, 0x72, 0x85, 0xae, - 0x16, 0x27, 0xe1, 0xe8, 0x51, 0xd2, 0xdb, 0x51, 0xed, 0x90, 0x49, 0xab, 0xff, 0x5c, 0x06, 0x53, - 0x49, 0xfe, 0xc7, 0xa5, 0xfe, 0x01, 0x98, 0x2a, 0x1e, 0xbd, 0x05, 0x8f, 0xee, 0xf4, 0x33, 0xfb, - 0xa9, 0x6d, 0x88, 0xd3, 0x28, 0xbb, 0x01, 0x6b, 0x38, 0xba, 0x57, 0xdc, 0xa0, 0xaa, 0x70, 0xa7, - 0x2f, 0xf4, 0x57, 0xb4, 0xad, 0xa9, 0x6a, 0x71, 0xa5, 0xde, 0x01, 0x53, 0x55, 0x1b, 0xdd, 0x80, - 0x33, 0x71, 0xe1, 0xe8, 0xe5, 0x65, 0x59, 0x9d, 0xe3, 0x40, 0x21, 0x74, 0x6d, 0x67, 0xb5, 0xdc, - 0xeb, 0x4f, 0x9f, 0x5b, 0xa5, 0x67, 0xcf, 0xad, 0xd2, 0x8b, 0xe7, 0x96, 0xf1, 0xe3, 0xd8, 0x32, - 0xfe, 0x18, 0x5b, 0xc6, 0xfe, 0xd8, 0x32, 0x9e, 0x8e, 0x2d, 0xe3, 0x9f, 0xb1, 0x65, 0xfc, 0x3b, - 0xb6, 0x4a, 0x2f, 0xc6, 0x96, 0xf1, 0xcb, 0x81, 0x55, 0x7a, 0x7a, 0x60, 0x95, 0x9e, 0x1d, 0x58, - 0xa5, 0xef, 0x8a, 0xff, 0x94, 0x77, 0x4d, 0x79, 0xab, 0xaf, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, - 0xc9, 0x8e, 0x9e, 0x8e, 0xb7, 0x0b, 0x00, 0x00, + // 1233 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xc6, 0xf6, 0x26, 0x7e, 0x4e, 0x93, 0x32, 0xe9, 0x87, 0x53, 0xca, 0xae, 0x59, 0x81, + 0x14, 0x04, 0x75,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0x0b, 0xd5, 0x38, + 0x51, 0x4e, 0x0c, 0x2c, 0x3e, 0xd1, 0xfb, 0x30, 0xdf, 0x4d, 0x7a, 0x3b, 0x94, 0xe7, 0x95, 0x98, + 0x76, 0x3d, 0x71, 0x2a, 0x41, 0x38, 0x07, 0x3b, 0x31, 0x2c, 0x1f, 0xd2, 0x21, 0x0b, 0xa0, 0x1b, + 0x26, 0x41, 0x9f, 0x30, 0x8f, 0xaa, 0x44, 0xeb, 0xb8, 0x24, 0x11, 0x21, 0x0d, 0xc3, 0x5d, 0xca, + 0xb4, 0x7b, 0x75, 0x10, 0xd2, 0x44, 0xb8, 0x93, 0x13, 0x6c, 0x60, 0x75, 0x98, 0x84, 0x5f, 0x2b, + 0x85, 0xef, 0xf8, 0x70, 0xf1, 0x98, 0x99, 0x46, 0x78, 0xd2, 0x10, 0x86, 0x2c, 0xe1, 0xdb, 0xa7, + 0xad, 0x02, 0x85, 0x56, 0x1b, 0xa1, 0x29, 0xc6, 0x53, 0xf3, 0x8b, 0x46, 0x71, 0xf6, 0xe7, 0xc0, + 0x3a, 0x99, 0x88, 0xee, 0xc0, 0x79, 0x1e, 0x72, 0x32, 0x94, 0xbb, 0x8a, 0x74, 0x87, 0xb9, 0x56, + 0x8f, 0xf1, 0x6a, 0x96, 0xda, 0xb3, 0x01, 0x78, 0xb6, 0x18, 0xfd, 0x66, 0xc0, 0xe5, 0x99, 0x9a, + 0xbb, 0x94, 0x6d, 0x71, 0x1a, 0xe9, 0x76, 0xff, 0xf8, 0x94, 0xec, 0x0e, 0xb3, 0x65, 0xb4, 0xda, + 0x84, 0xdb, 0xce, 0x52, 0xfb, 0x44, 0x27, 0xf8, 0x44, 0x2d, 0x7a, 0x17, 0x9a, 0x11, 0x25, 0x3b, + 0x79, 0xaa, 0x55, 0x99, 0xea, 0x72, 0x96, 0xda, 0x65, 0x31, 0x2e, 0x1f, 0x1c, 0x0f, 0x5e, 0x32, + 0x48, 0xd1, 0x01, 0x72, 0x70, 0xf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68, 0x43, 0xc6, 0x15, 0x3c, 0xc5, + 0x71, 0xee, 0x80, 0xa9, 0x6e, 0x0c, 0xdd, 0x80, 0x33, 0x71, 0xe9, 0xe1, 0xcc, 0x4b, 0xbb, 0x3a, + 0x23, 0x48, 0x85, 0xd0, 0xf7, 0x33, 0xcd, 0x72, 0xaf, 0x3f, 0x7d, 0x6e, 0x55, 0x9e, 0x3d, 0xb7, + 0x2a, 0x2f, 0x9e, 0x5b, 0xc6, 0x8f, 0x63, 0xcb, 0xf8, 0x7d, 0x6c, 0x19, 0xfb, 0x63, 0xcb, 0x78, + 0x3a, 0xb6, 0x8c, 0x7f, 0xc6, 0x96, 0xf1, 0xef, 0xd8, 0xaa, 0xbc, 0x18, 0x5b, 0xc6, 0xcf, 0x07, + 0x56, 0xe5, 0xe9, 0x81, 0x55, 0x79, 0x76, 0x60, 0x55, 0xbe, 0x2b, 0xff, 0x63, 0xdf, 0x35, 0xe5, + 0x7b, 0x7f, 0xf5, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0xa5, 0x92, 0x82, 0xfb, 0x0b, 0x00, + 0x00, } func (this *PrometheusResponse) Equal(that interface{}) bool { @@ -1647,6 +1659,9 @@ func (this *Sample) Equal(that interface{}) bool { if !this.Histogram.Equal(that1.Histogram) { return false } + if !this.RawHistogram.Equal(that1.RawHistogram) { + return false + } return true } func (this *Matrix) Equal(that interface{}) bool { @@ -1908,7 +1923,7 @@ func (this *Sample) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 8) s = append(s, "&tripperware.Sample{") s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") if this.Sample != nil { @@ -1917,6 +1932,9 @@ func (this *Sample) GoString() string { if this.Histogram != nil { s = append(s, "Histogram: "+fmt.Sprintf("%#v", this.Histogram)+",\n") } + if this.RawHistogram != nil { + s = append(s, "RawHistogram: "+fmt.Sprintf("%#v", this.RawHistogram)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -2674,6 +2692,18 @@ func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.RawHistogram != nil { + { + size, err := m.RawHistogram.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } if m.Histogram != nil { { size, err := m.Histogram.MarshalToSizedBuffer(dAtA[:i]) @@ -3099,6 +3129,10 @@ func (m *Sample) Size() (n int) { l = m.Histogram.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.RawHistogram != nil { + l = m.RawHistogram.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3360,6 +3394,7 @@ func (this *Sample) String() string { `Labels:` + fmt.Sprintf("%v", this.Labels) + `,`, `Sample:` + strings.Replace(fmt.Sprintf("%v", this.Sample), "Sample", "cortexpb.Sample", 1) + `,`, `Histogram:` + strings.Replace(this.Histogram.String(), "SampleHistogramPair", "SampleHistogramPair", 1) + `,`, + `RawHistogram:` + strings.Replace(fmt.Sprintf("%v", this.RawHistogram), "Histogram", "cortexpb.Histogram", 1) + `,`, `}`, }, "") return s @@ -5373,6 +5408,42 @@ func (m *Sample) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RawHistogram", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RawHistogram == nil { + m.RawHistogram = &cortexpb.Histogram{} + } + if err := m.RawHistogram.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/pkg/querier/tripperware/query.proto b/pkg/querier/tripperware/query.proto index 013b73022a..afef3d692b 100644 --- a/pkg/querier/tripperware/query.proto +++ b/pkg/querier/tripperware/query.proto @@ -104,6 +104,9 @@ message Sample { repeated cortexpb.LabelPair labels = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "metric", (gogoproto.customtype) = "github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter"]; cortexpb.Sample sample = 2 [(gogoproto.nullable) = true, (gogoproto.jsontag) = "value"]; SampleHistogramPair histogram = 3 [(gogoproto.nullable) = true, (gogoproto.jsontag) = "histogram"]; + // Full representation of a native histogram and it should be always float histogram type. + // This field should be never deserialized into JSON and should only exist in protobuf format. + cortexpb.Histogram rawHistogram = 4 [(gogoproto.nullable) = true, (gogoproto.jsontag) = "-"]; } message Matrix {