diff --git a/pkg/ingester/ingester.go b/pkg/ingester/ingester.go index 7d0fb671a0a5..ea691b69b874 100644 --- a/pkg/ingester/ingester.go +++ b/pkg/ingester/ingester.go @@ -4,6 +4,7 @@ import ( "context" "flag" "fmt" + "github.com/grafana/loki/pkg/logqlmodel/metadata" "math/rand" "net/http" "os" @@ -874,6 +875,7 @@ func (i *Ingester) GetOrCreateInstance(instanceID string) (*instance, error) { / func (i *Ingester) Query(req *logproto.QueryRequest, queryServer logproto.Querier_QueryServer) error { // initialize stats collection for ingester queries. _, ctx := stats.NewContext(queryServer.Context()) + _, ctx = metadata.NewContext(ctx) if req.Plan == nil { parsed, err := syntax.ParseLogSelector(req.Selector, true) @@ -933,6 +935,7 @@ func (i *Ingester) Query(req *logproto.QueryRequest, queryServer logproto.Querie func (i *Ingester) QuerySample(req *logproto.SampleQueryRequest, queryServer logproto.Querier_QuerySampleServer) error { // initialize stats collection for ingester queries. _, ctx := stats.NewContext(queryServer.Context()) + _, ctx = metadata.NewContext(ctx) sp := opentracing.SpanFromContext(ctx) // If the plan is empty we want all series to be returned. diff --git a/pkg/ingester/instance.go b/pkg/ingester/instance.go index e0e9d5e4ca6b..21465a62cd85 100644 --- a/pkg/ingester/instance.go +++ b/pkg/ingester/instance.go @@ -3,6 +3,7 @@ package ingester import ( "context" "fmt" + "github.com/grafana/loki/pkg/logqlmodel/metadata" "math" "net/http" "os" @@ -953,6 +954,7 @@ type QuerierQueryServer interface { func sendBatches(ctx context.Context, i iter.EntryIterator, queryServer QuerierQueryServer, limit int32) error { stats := stats.FromContext(ctx) + metadata := metadata.FromContext(ctx) // send until the limit is reached. for limit != 0 && !isDone(ctx) { @@ -971,6 +973,7 @@ func sendBatches(ctx context.Context, i iter.EntryIterator, queryServer QuerierQ stats.AddIngesterBatch(int64(batchSize)) batch.Stats = stats.Ingester() + batch.Warnings = metadata.Warnings() if isDone(ctx) { break @@ -985,6 +988,7 @@ func sendBatches(ctx context.Context, i iter.EntryIterator, queryServer QuerierQ } stats.Reset() + metadata.Reset() } return nil } @@ -993,6 +997,7 @@ func sendSampleBatches(ctx context.Context, it iter.SampleIterator, queryServer sp := opentracing.SpanFromContext(ctx) stats := stats.FromContext(ctx) + metadata := metadata.FromContext(ctx) for !isDone(ctx) { batch, size, err := iter.ReadSampleBatch(it, queryBatchSampleSize) if err != nil { @@ -1001,6 +1006,8 @@ func sendSampleBatches(ctx context.Context, it iter.SampleIterator, queryServer stats.AddIngesterBatch(int64(size)) batch.Stats = stats.Ingester() + batch.Warnings = metadata.Warnings() + if isDone(ctx) { break } @@ -1014,6 +1021,8 @@ func sendSampleBatches(ctx context.Context, it iter.SampleIterator, queryServer } stats.Reset() + metadata.Reset() + if sp != nil { sp.LogKV("event", "sent batch", "size", size) } diff --git a/pkg/iter/entry_iterator.go b/pkg/iter/entry_iterator.go index fa67da6a3bc0..716e5d4cfb75 100644 --- a/pkg/iter/entry_iterator.go +++ b/pkg/iter/entry_iterator.go @@ -2,6 +2,7 @@ package iter import ( "context" + "github.com/grafana/loki/pkg/logqlmodel/metadata" "io" "math" "sync" @@ -379,6 +380,7 @@ func (i *queryClientIterator) Next() bool { return false } stats.JoinIngesters(ctx, batch.Stats) + _ = metadata.AddWarnings(ctx, batch.Warnings...) i.curr = NewQueryResponseIterator(batch, i.direction) } diff --git a/pkg/iter/sample_iterator.go b/pkg/iter/sample_iterator.go index 632ed9106df1..fe8b4e9005ac 100644 --- a/pkg/iter/sample_iterator.go +++ b/pkg/iter/sample_iterator.go @@ -3,6 +3,7 @@ package iter import ( "container/heap" "context" + "github.com/grafana/loki/pkg/logqlmodel/metadata" "io" "sync" @@ -490,6 +491,8 @@ func (i *sampleQueryClientIterator) Next() bool { return false } stats.JoinIngesters(ctx, batch.Stats) + _ = metadata.AddWarnings(ctx, batch.Warnings...) + i.curr = NewSampleQueryResponseIterator(batch) } return true diff --git a/pkg/loghttp/query.go b/pkg/loghttp/query.go index 75f75c60ccc0..d677fd1a1908 100644 --- a/pkg/loghttp/query.go +++ b/pkg/loghttp/query.go @@ -42,8 +42,9 @@ const ( // QueryResponse represents the http json response to a Loki range and instant query type QueryResponse struct { - Status string `json:"status"` - Data QueryResponseData `json:"data"` + Status string `json:"status"` + Warnings []string `json:"warnings,omitempty"` + Data QueryResponseData `json:"data"` } func (q *QueryResponse) UnmarshalJSON(data []byte) error { @@ -51,6 +52,15 @@ func (q *QueryResponse) UnmarshalJSON(data []byte) error { switch string(key) { case "status": q.Status = string(value) + case "warnings": + var warnings []string + if _, err := jsonparser.ArrayEach(value, func(value []byte, dataType jsonparser.ValueType, offset int, err error) { + warnings = append(warnings, string(value)) + }); err != nil { + return err + } + + q.Warnings = warnings case "data": var responseData QueryResponseData if err := responseData.UnmarshalJSON(value); err != nil { diff --git a/pkg/logproto/logproto.pb.go b/pkg/logproto/logproto.pb.go index 11482676c0ef..0e3cf5ee2ae9 100644 --- a/pkg/logproto/logproto.pb.go +++ b/pkg/logproto/logproto.pb.go @@ -490,8 +490,9 @@ func (m *Delete) GetEnd() int64 { } type QueryResponse struct { - Streams []github_com_grafana_loki_pkg_push.Stream `protobuf:"bytes,1,rep,name=streams,proto3,customtype=github.com/grafana/loki/pkg/push.Stream" json:"streams,omitempty"` - Stats stats.Ingester `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats"` + Streams []github_com_grafana_loki_pkg_push.Stream `protobuf:"bytes,1,rep,name=streams,proto3,customtype=github.com/grafana/loki/pkg/push.Stream" json:"streams,omitempty"` + Stats stats.Ingester `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats"` + Warnings []string `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` } func (m *QueryResponse) Reset() { *m = QueryResponse{} } @@ -533,9 +534,17 @@ func (m *QueryResponse) GetStats() stats.Ingester { return stats.Ingester{} } +func (m *QueryResponse) GetWarnings() []string { + if m != nil { + return m.Warnings + } + return nil +} + type SampleQueryResponse struct { - Series []Series `protobuf:"bytes,1,rep,name=series,proto3,customtype=Series" json:"series,omitempty"` - Stats stats.Ingester `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats"` + Series []Series `protobuf:"bytes,1,rep,name=series,proto3,customtype=Series" json:"series,omitempty"` + Stats stats.Ingester `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats"` + Warnings []string `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` } func (m *SampleQueryResponse) Reset() { *m = SampleQueryResponse{} } @@ -577,6 +586,13 @@ func (m *SampleQueryResponse) GetStats() stats.Ingester { return stats.Ingester{} } +func (m *SampleQueryResponse) GetWarnings() []string { + if m != nil { + return m.Warnings + } + return nil +} + type LabelRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Values bool `protobuf:"varint,2,opt,name=values,proto3" json:"values,omitempty"` @@ -2877,159 +2893,160 @@ func init() { func init() { proto.RegisterFile("pkg/logproto/logproto.proto", fileDescriptor_c28a5f14f1f4c79a) } var fileDescriptor_c28a5f14f1f4c79a = []byte{ - // 2431 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x19, 0x4b, 0x6f, 0x1b, 0xc7, - 0x99, 0x4b, 0x2e, 0x5f, 0x1f, 0x29, 0x59, 0x1e, 0xd1, 0x32, 0xc1, 0xd8, 0xa4, 0x3c, 0x48, 0x1c, - 0xd5, 0x71, 0xc4, 0x58, 0x6e, 0xdc, 0xd4, 0x6e, 0x90, 0x9a, 0x52, 0xec, 0xc8, 0x96, 0x1f, 0x19, - 0xb9, 0x6e, 0x6a, 0xb4, 0x35, 0x56, 0xe4, 0x88, 0x5a, 0x88, 0xdc, 0xa5, 0x77, 0x87, 0xb1, 0x05, - 0xf4, 0xd0, 0x3f, 0x10, 0x34, 0xb7, 0xa2, 0x97, 0xa2, 0x05, 0x0a, 0xa4, 0x40, 0xd1, 0x4b, 0x7f, - 0x40, 0x7b, 0xe9, 0xc1, 0xbd, 0x39, 0x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0xec, 0x8d, - 0x1a, 0x62, 0x4e, 0xc4, 0x2f, 0xbe, 0x0a, 0xe5, 0x35, 0xda, 0xb5, 0xda, 0x3b, 0xea, 0xd0, 0x8a, - 0x26, 0xc7, 0x0f, 0x34, 0x34, 0x8d, 0x53, 0x50, 0x0e, 0x4e, 0xbc, 0xdf, 0xf7, 0x95, 0x53, 0x97, - 0x02, 0xd8, 0x0d, 0x1f, 0xff, 0xc2, 0x00, 0x65, 0x67, 0x84, 0x21, 0xd7, 0xe3, 0xb2, 0xfa, 0x2a, - 0x06, 0xc1, 0xde, 0xa8, 0xa1, 0x20, 0x44, 0x7d, 0xd1, 0x25, 0xc8, 0xfb, 0xe2, 0x44, 0x4e, 0x2c, - 0xe9, 0x3e, 0x62, 0xa1, 0x75, 0x84, 0xbb, 0xc1, 0xde, 0xa8, 0xa1, 0x11, 0x89, 0x1e, 0xa0, 0xc5, - 0x58, 0xe6, 0x94, 0x82, 0x4d, 0xef, 0x8d, 0x1a, 0x11, 0x68, 0x34, 0x93, 0xe2, 0x7f, 0x18, 0x50, - 0xba, 0x63, 0xd9, 0x81, 0x0b, 0x55, 0xb5, 0x89, 0xc2, 0x18, 0x29, 0x01, 0xfc, 0x4a, 0x77, 0x68, - 0xcf, 0xda, 0xb9, 0xe2, 0x7a, 0x82, 0xee, 0x14, 0x09, 0xe6, 0x61, 0xb2, 0x33, 0xc7, 0x26, 0xbb, - 0xec, 0xe4, 0x21, 0xf5, 0xbf, 0x18, 0xc0, 0xae, 0x99, 0x85, 0xf4, 0x4c, 0x06, 0xff, 0xde, 0x80, - 0xb2, 0x94, 0x5c, 0xb9, 0xdd, 0x0f, 0x21, 0x27, 0x15, 0x23, 0x64, 0x7f, 0x4e, 0x70, 0x79, 0x63, - 0x92, 0xc0, 0xa2, 0x68, 0xa2, 0xf7, 0x60, 0xba, 0xe3, 0xb9, 0x83, 0x01, 0xed, 0xac, 0xab, 0x10, - 0x96, 0x4e, 0x86, 0xb0, 0x95, 0xe8, 0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0x91, 0xcd, 0x44, 0x9f, 0x80, 0x7e, - 0xac, 0xca, 0xad, 0xec, 0xd8, 0x72, 0x4b, 0xdf, 0xdc, 0xc3, 0xf7, 0x8c, 0xef, 0x86, 0xb1, 0x4f, - 0x98, 0x43, 0xc5, 0xbe, 0xd3, 0x60, 0x7a, 0x74, 0x53, 0x27, 0x69, 0x14, 0x1e, 0x1b, 0x60, 0x8a, - 0x75, 0xfc, 0x47, 0x03, 0x66, 0xae, 0x52, 0x16, 0x2f, 0x7f, 0x5e, 0x22, 0x63, 0xe2, 0x0f, 0xe0, - 0x68, 0x84, 0x7f, 0x25, 0xfd, 0xf9, 0x44, 0xcd, 0x73, 0x2c, 0x94, 0x7f, 0xd5, 0xe9, 0xd0, 0x47, - 0xaa, 0x57, 0x8c, 0x97, 0x3b, 0xb7, 0xa1, 0x14, 0x59, 0x44, 0x97, 0x13, 0x85, 0x4e, 0xe4, 0x65, - 0x27, 0x48, 0xd6, 0xad, 0x8a, 0x92, 0x49, 0x76, 0x8b, 0xaa, 0x8c, 0x0d, 0x8a, 0x82, 0x75, 0x40, - 0xc2, 0x5c, 0x82, 0x6c, 0x34, 0x2d, 0x09, 0xe8, 0xf5, 0xa0, 0xe2, 0x09, 0xe6, 0xe8, 0x14, 0x98, - 0x9e, 0xfb, 0x50, 0x57, 0xb0, 0x53, 0xe1, 0x91, 0xc4, 0x7d, 0x48, 0xc4, 0x12, 0xbe, 0x04, 0x19, - 0xe2, 0x3e, 0x44, 0x75, 0x00, 0xcf, 0x72, 0xba, 0xf4, 0x6e, 0xd0, 0x38, 0x95, 0x49, 0x04, 0x72, - 0x40, 0xc9, 0xb0, 0x0c, 0x47, 0xa3, 0x1c, 0x49, 0x73, 0x2f, 0x42, 0xfe, 0xc3, 0x61, 0x54, 0x5d, - 0x95, 0x84, 0xba, 0x64, 0x0f, 0xae, 0x91, 0xb8, 0xcf, 0x40, 0x08, 0x47, 0x27, 0xa0, 0xc8, 0xac, - 0x8d, 0x1e, 0xbd, 0x19, 0x06, 0xb8, 0x10, 0xc0, 0x57, 0x79, 0xcf, 0x77, 0x37, 0x52, 0xfb, 0x84, - 0x00, 0x74, 0x06, 0x66, 0x42, 0x9e, 0x6f, 0x7b, 0x74, 0xd3, 0x7e, 0x24, 0x2c, 0x5c, 0x26, 0xfb, - 0xe0, 0x68, 0x01, 0x8e, 0x84, 0xb0, 0x75, 0x51, 0x63, 0x98, 0x02, 0x35, 0x09, 0xe6, 0xba, 0x11, - 0xe2, 0xbe, 0xff, 0x60, 0x68, 0xf5, 0xc4, 0xcd, 0x2b, 0x93, 0x08, 0x04, 0xff, 0xc9, 0x80, 0xa3, - 0xd2, 0xd4, 0xbc, 0xdb, 0x7f, 0x19, 0xbd, 0xfe, 0x33, 0x03, 0x50, 0x54, 0x02, 0xe5, 0x5a, 0xaf, - 0x45, 0x9f, 0x71, 0x78, 0x11, 0x53, 0x12, 0xad, 0xac, 0x04, 0x85, 0x2f, 0x31, 0x18, 0x72, 0xa2, - 0x10, 0x92, 0x3d, 0xb5, 0x29, 0x7b, 0x65, 0x09, 0x21, 0xea, 0xcb, 0x5b, 0xfc, 0x8d, 0x1d, 0x46, - 0x7d, 0xd5, 0xe9, 0x8a, 0x16, 0x5f, 0x00, 0x88, 0xfc, 0xf0, 0xb3, 0xa8, 0xc3, 0x84, 0xd7, 0x98, - 0xe1, 0x59, 0x0a, 0x44, 0xf4, 0x00, 0xff, 0x2e, 0x0d, 0x53, 0x77, 0xdd, 0xde, 0x30, 0x4c, 0x89, - 0x2f, 0x53, 0xaa, 0x88, 0xb5, 0xdf, 0x59, 0xdd, 0x7e, 0x23, 0x30, 0x7d, 0x46, 0x07, 0xc2, 0xb3, - 0x32, 0x44, 0x8c, 0x11, 0x86, 0x32, 0xb3, 0xbc, 0x2e, 0x65, 0xb2, 0xaf, 0xa9, 0xe6, 0x44, 0xc1, - 0x19, 0x83, 0xa1, 0x79, 0x28, 0x59, 0xdd, 0xae, 0x47, 0xbb, 0x16, 0xa3, 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0x6b, 0x27, 0xc6, 0x2f, 0x06, 0x84, 0xbe, 0x0b, - 0xc5, 0xab, 0x94, 0xa9, 0xb8, 0x79, 0x3c, 0x19, 0x78, 0xc7, 0x68, 0x2a, 0x1e, 0xbc, 0x71, 0x0a, - 0x7d, 0x24, 0xca, 0xd3, 0x78, 0x24, 0x42, 0x8d, 0x03, 0x22, 0x4e, 0xc0, 0xd7, 0xfc, 0xc1, 0x08, - 0x9a, 0xf2, 0xd2, 0x8f, 0xf4, 0xff, 0xba, 0x2b, 0x16, 0xb3, 0xd0, 0x2d, 0x98, 0x16, 0x22, 0x07, - 0x7f, 0xfc, 0xc6, 0x5c, 0x73, 0xdf, 0xbf, 0xcc, 0x31, 0xd7, 0xdc, 0xff, 0x6f, 0x33, 0x4e, 0xb5, - 0xee, 0x3d, 0x79, 0x5a, 0x4f, 0x7d, 0xf1, 0xb4, 0x9e, 0xfa, 0xea, 0x69, 0xdd, 0xf8, 0xe9, 0x6e, - 0xdd, 0xf8, 0xed, 0x6e, 0xdd, 0x78, 0xbc, 0x5b, 0x37, 0x9e, 0xec, 0xd6, 0x8d, 0xbf, 0xed, 0xd6, - 0x8d, 0xbf, 0xef, 0xd6, 0x53, 0x5f, 0xed, 0xd6, 0x8d, 0x4f, 0x9f, 0xd5, 0x53, 0x4f, 0x9e, 0xd5, - 0x53, 0x5f, 0x3c, 0xab, 0xa7, 0xee, 0xbd, 0xfa, 0x6f, 0x7a, 0x25, 0x19, 0x6a, 0x72, 0xe2, 0x73, - 0xfe, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x75, 0x76, 0x03, 0x96, 0x1f, 0x00, 0x00, + // 2442 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x19, 0x4d, 0x6f, 0x1b, 0xc7, + 0x95, 0x4b, 0x2e, 0xbf, 0x1e, 0x29, 0x59, 0x1e, 0xd1, 0x32, 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x9f, + 0xe1, 0x1b, 0x30, 0x1b, 0xc3, 0xfa, 0x03, 0xd7, 0xf1, 0x29, 0xba, 0x00, 0x25, 0x3f, 0x44, 0x57, + 0x8d, 0xf9, 0xcc, 0x42, 0x69, 0xa9, 0xb2, 0x18, 0x88, 0x12, 0xae, 0x21, 0x51, 0x42, 0xfc, 0x4b, + 0x03, 0x20, 0x9c, 0x43, 0x75, 0x00, 0x39, 0xfb, 0x81, 0xe5, 0x6f, 0x55, 0x8d, 0x79, 0x63, 0xc1, + 0x24, 0x11, 0x0c, 0x3a, 0x0b, 0x47, 0x43, 0xe8, 0xa6, 0xbb, 0xbe, 0x65, 0x79, 0x9d, 0x6a, 0x5a, + 0x90, 0xed, 0x9f, 0x40, 0x08, 0x4c, 0xcf, 0x62, 0xb4, 0x9a, 0x99, 0x37, 0x16, 0x32, 0x44, 0x8c, + 0xd1, 0x1c, 0xe4, 0x18, 0x75, 0x2c, 0x87, 0x55, 0xcd, 0x79, 0x63, 0xa1, 0x48, 0x14, 0xc4, 0xf1, + 0x5c, 0x76, 0xea, 0x57, 0xb3, 0xf3, 0xc6, 0xc2, 0x14, 0x51, 0x10, 0xfe, 0x2c, 0x03, 0xe5, 0x0f, + 0x87, 0xd4, 0xdb, 0x51, 0x0a, 0x40, 0x75, 0x28, 0xf8, 0xb4, 0x47, 0xdb, 0xcc, 0xf5, 0xc4, 0x01, + 0x8b, 0xad, 0x74, 0xd5, 0x20, 0x01, 0x0e, 0x55, 0x20, 0xdb, 0xb3, 0xfb, 0x36, 0x13, 0xc7, 0x9a, + 0x22, 0x12, 0x40, 0x17, 0x21, 0xeb, 0x33, 0xcb, 0x63, 0xe2, 0x2c, 0xa5, 0xa5, 0xda, 0xa2, 0x34, + 0xda, 0xa2, 0x36, 0xda, 0xe2, 0x1d, 0x6d, 0xb4, 0x56, 0xe1, 0xf1, 0xa8, 0x91, 0xfa, 0xf4, 0xaf, + 0x0d, 0x83, 0xc8, 0x25, 0xe8, 0x02, 0x64, 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12, 0xc1, 0x3d, 0xb1, 0x43, 0x7b, 0xd6, + 0xce, 0x15, 0xd7, 0x13, 0x7c, 0xa7, 0x48, 0x00, 0x87, 0x59, 0xd2, 0x1c, 0x9b, 0x25, 0xb3, 0x93, + 0xc7, 0xe2, 0xff, 0x62, 0xe4, 0xbb, 0x66, 0x16, 0xd2, 0x33, 0x19, 0xfc, 0x3b, 0x03, 0xca, 0x52, + 0x72, 0xe5, 0x76, 0x3f, 0x84, 0x9c, 0x54, 0x8c, 0x90, 0xfd, 0x39, 0x51, 0xe9, 0x8d, 0x49, 0x22, + 0x92, 0xe2, 0x89, 0xde, 0x83, 0xe9, 0x8e, 0xe7, 0x0e, 0x06, 0xb4, 0xb3, 0xae, 0x62, 0x5f, 0x3a, + 0x19, 0xfb, 0x56, 0xa2, 0xf3, 0x24, 0x41, 0x8e, 0xff, 0x62, 0xc0, 0x94, 0x8a, 0x24, 0xca, 0x56, + 0x81, 0x7e, 0x8d, 0x43, 0xe7, 0xba, 0xf4, 0xa4, 0xb9, 0x6e, 0x0e, 0x72, 0x5d, 0xcf, 0x1d, 0x0e, + 0x74, 0x34, 0x52, 0xd0, 0x64, 0x39, 0x10, 0x5f, 0x83, 0x69, 0x2d, 0xca, 0x01, 0xe1, 0xb4, 0x96, + 0x0c, 0xa7, 0xab, 0x1d, 0xea, 0x30, 0x7b, 0xd3, 0x0e, 0x02, 0xa4, 0xa2, 0xc7, 0x3f, 0x35, 0x60, + 0x26, 0x49, 0x82, 0x56, 0x22, 0xf7, 0x8c, 0xb3, 0x3b, 0x7d, 0x30, 0xbb, 0x45, 0x11, 0x7c, 0xfc, + 0xf7, 0x1d, 0xe6, 0xed, 0x68, 0xd6, 0x72, 0x6d, 0xed, 0x6d, 0x28, 0x45, 0x26, 0x79, 0x6e, 0xdb, + 0xa6, 0xea, 0x66, 0x10, 0x3e, 0x0c, 0x43, 0x42, 0x5a, 0x06, 0x34, 0x01, 0xe0, 0x9f, 0x19, 0x30, + 0x15, 0xb3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 0xaa, 0xd3, 0x15, 0x2d, + 0xbe, 0x40, 0x10, 0xf9, 0xe1, 0x7b, 0x51, 0x87, 0x09, 0xaf, 0x31, 0xc3, 0xbd, 0x14, 0x8a, 0xe8, + 0x01, 0xfe, 0x6d, 0x1a, 0xa6, 0xee, 0xba, 0xbd, 0x61, 0x98, 0x12, 0x5f, 0xa6, 0x54, 0x11, 0x6b, + 0xbf, 0xb3, 0xba, 0xfd, 0x46, 0x60, 0xfa, 0x8c, 0x0e, 0x84, 0x67, 0x65, 0x88, 0x18, 0x23, 0x0c, + 0x65, 0x66, 0x79, 0x5d, 0xca, 0x64, 0x5f, 0x53, 0xcd, 0x89, 0x82, 0x33, 0x86, 0x43, 0xf3, 0x50, + 0xb2, 0xba, 0x5d, 0x8f, 0x76, 0x2d, 0x46, 0x5b, 0x3b, 0xd5, 0xbc, 0xd8, 0x2c, 0x8a, 0xc2, 0x1f, + 0xc1, 0xb4, 0x56, 0x96, 0x32, 0xe9, 0x5b, 0x90, 0xff, 0x58, 0x60, 0xc6, 0x3c, 0x87, 0x49, 0x52, + 0x15, 0xc6, 0x34, 0x59, 0xfc, 0x61, 0x5d, 0x9f, 0x19, 0x5f, 0x83, 0x9c, 0x24, 0x47, 0x27, 0xa2, + 0xdd, 0x89, 0x7c, 0x9b, 0xe1, 0xb0, 0x6a, 0x35, 0x30, 0xe4, 0x24, 0x23, 0x65, 0x78, 0xe1, 0x1b, + 0x12, 0x43, 0xd4, 0x17, 0xff, 0xca, 0x80, 0x63, 0x2b, 0x94, 0xd1, 0x36, 0xa3, 0x9d, 0x2b, 0x36, + 0xed, 0x75, 0x0e, 0xdb, 0x38, 0x1b, 0x87, 0x6e, 0x9c, 0xc7, 0xbd, 0x7d, 0x65, 0xa2, 0x6f, 0x5f, + 0xab, 0x30, 0x97, 0x3c, 0xa2, 0xd2, 0x68, 0x13, 0x72, 0x9b, 0x02, 0xb3, 0xff, 0x8d, 0x34, 0xb6, + 0x82, 0x28, 0x32, 0xec, 0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0x7d, 0xb7, 0x9e, + 0xfa, 0x6a, 0xb7, 0x6e, 0x7c, 0xfa, 0xac, 0x9e, 0x7a, 0xf2, 0xac, 0x9e, 0xfa, 0xe2, 0x59, 0x3d, + 0x75, 0xef, 0xd5, 0x7f, 0xd3, 0x2b, 0xc9, 0x50, 0x93, 0x13, 0x9f, 0xf3, 0xff, 0x0a, 0x00, 0x00, + 0xff, 0xff, 0xbd, 0xee, 0x87, 0x9d, 0xcf, 0x1f, 0x00, 0x00, } func (x Direction) String() string { @@ -3321,6 +3338,14 @@ func (this *QueryResponse) Equal(that interface{}) bool { if !this.Stats.Equal(&that1.Stats) { return false } + if len(this.Warnings) != len(that1.Warnings) { + return false + } + for i := range this.Warnings { + if this.Warnings[i] != that1.Warnings[i] { + return false + } + } return true } func (this *SampleQueryResponse) Equal(that interface{}) bool { @@ -3353,6 +3378,14 @@ func (this *SampleQueryResponse) Equal(that interface{}) bool { if !this.Stats.Equal(&that1.Stats) { return false } + if len(this.Warnings) != len(that1.Warnings) { + return false + } + for i := range this.Warnings { + if this.Warnings[i] != that1.Warnings[i] { + return false + } + } return true } func (this *LabelRequest) Equal(that interface{}) bool { @@ -4798,10 +4831,11 @@ func (this *QueryResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&logproto.QueryResponse{") s = append(s, "Streams: "+fmt.Sprintf("%#v", this.Streams)+",\n") s = append(s, "Stats: "+strings.Replace(this.Stats.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Warnings: "+fmt.Sprintf("%#v", this.Warnings)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -4809,10 +4843,11 @@ func (this *SampleQueryResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&logproto.SampleQueryResponse{") s = append(s, "Series: "+fmt.Sprintf("%#v", this.Series)+",\n") s = append(s, "Stats: "+strings.Replace(this.Stats.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Warnings: "+fmt.Sprintf("%#v", this.Warnings)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -6299,6 +6334,15 @@ func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Warnings[iNdEx]) + copy(dAtA[i:], m.Warnings[iNdEx]) + i = encodeVarintLogproto(dAtA, i, uint64(len(m.Warnings[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } { size, err := m.Stats.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -6346,6 +6390,15 @@ func (m *SampleQueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Warnings[iNdEx]) + copy(dAtA[i:], m.Warnings[iNdEx]) + i = encodeVarintLogproto(dAtA, i, uint64(len(m.Warnings[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } { size, err := m.Stats.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -8365,6 +8418,12 @@ func (m *QueryResponse) Size() (n int) { } l = m.Stats.Size() n += 1 + l + sovLogproto(uint64(l)) + if len(m.Warnings) > 0 { + for _, s := range m.Warnings { + l = len(s) + n += 1 + l + sovLogproto(uint64(l)) + } + } return n } @@ -8382,6 +8441,12 @@ func (m *SampleQueryResponse) Size() (n int) { } l = m.Stats.Size() n += 1 + l + sovLogproto(uint64(l)) + if len(m.Warnings) > 0 { + for _, s := range m.Warnings { + l = len(s) + n += 1 + l + sovLogproto(uint64(l)) + } + } return n } @@ -9300,6 +9365,7 @@ func (this *QueryResponse) String() string { s := strings.Join([]string{`&QueryResponse{`, `Streams:` + fmt.Sprintf("%v", this.Streams) + `,`, `Stats:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Stats), "Ingester", "stats.Ingester", 1), `&`, ``, 1) + `,`, + `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, `}`, }, "") return s @@ -9311,6 +9377,7 @@ func (this *SampleQueryResponse) String() string { s := strings.Join([]string{`&SampleQueryResponse{`, `Series:` + fmt.Sprintf("%v", this.Series) + `,`, `Stats:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Stats), "Ingester", "stats.Ingester", 1), `&`, ``, 1) + `,`, + `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, `}`, }, "") return s @@ -11023,6 +11090,38 @@ func (m *QueryResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLogproto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLogproto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLogproto(dAtA[iNdEx:]) @@ -11143,6 +11242,38 @@ func (m *SampleQueryResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLogproto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLogproto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLogproto(dAtA[iNdEx:]) diff --git a/pkg/logproto/logproto.proto b/pkg/logproto/logproto.proto index 9dd58a8b5f3a..a74b15b5d016 100644 --- a/pkg/logproto/logproto.proto +++ b/pkg/logproto/logproto.proto @@ -102,6 +102,7 @@ message QueryResponse { (gogoproto.nullable) = true ]; stats.Ingester stats = 2 [(gogoproto.nullable) = false]; + repeated string warnings = 3; } message SampleQueryResponse { @@ -110,6 +111,7 @@ message SampleQueryResponse { (gogoproto.nullable) = true ]; stats.Ingester stats = 2 [(gogoproto.nullable) = false]; + repeated string warnings = 3; } enum Direction { diff --git a/pkg/logql/accumulator.go b/pkg/logql/accumulator.go index 9e9784cb037e..b965e0a2d823 100644 --- a/pkg/logql/accumulator.go +++ b/pkg/logql/accumulator.go @@ -90,8 +90,9 @@ type AccumulatedStreams struct { streams []*logproto.Stream order logproto.Direction - stats stats.Result // for accumulating statistics from downstream requests - headers map[string][]string // for accumulating headers from downstream requests + stats stats.Result // for accumulating statistics from downstream requests + headers map[string][]string // for accumulating headers from downstream requests + warnings map[string]struct{} // for accumulating warnings from downstream requests } // NewStreamAccumulator returns an accumulator for limited log queries. @@ -113,7 +114,8 @@ func NewStreamAccumulator(params Params) *AccumulatedStreams { order: order, limit: int(params.Limit()), - headers: make(map[string][]string), + headers: make(map[string][]string), + warnings: make(map[string]struct{}), } } @@ -353,6 +355,14 @@ func (acc *AccumulatedStreams) Result() []logqlmodel.Result { ) } + warnings := make([]string, 0, len(acc.warnings)) + for w := range acc.warnings { + warnings = append(warnings, w) + } + sort.Strings(warnings) + + res.Warnings = warnings + return []logqlmodel.Result{res} } @@ -367,6 +377,10 @@ func (acc *AccumulatedStreams) Accumulate(_ context.Context, x logqlmodel.Result acc.stats.Merge(x.Statistics) metadata.ExtendHeaders(acc.headers, x.Headers) + for _, w := range x.Warnings { + acc.warnings[w] = struct{}{} + } + switch got := x.Data.(type) { case logqlmodel.Streams: for i := range got { diff --git a/pkg/logql/downstream.go b/pkg/logql/downstream.go index 5dea1144d9a1..6792851ddb88 100644 --- a/pkg/logql/downstream.go +++ b/pkg/logql/downstream.go @@ -353,6 +353,10 @@ func (ev DownstreamEvaluator) Downstream(ctx context.Context, queries []Downstre } for _, res := range results { + if err := metadata.AddWarnings(ctx, res.Warnings...); err != nil { + level.Warn(util_log.Logger).Log("msg", "unable to add headers to results context", "error", err) + } + if err := metadata.JoinHeaders(ctx, res.Headers); err != nil { level.Warn(util_log.Logger).Log("msg", "unable to add headers to results context", "error", err) break diff --git a/pkg/logql/engine.go b/pkg/logql/engine.go index a9f3dabe14ee..cd9a442f46bd 100644 --- a/pkg/logql/engine.go +++ b/pkg/logql/engine.go @@ -262,10 +262,14 @@ func (q *query) Exec(ctx context.Context) (logqlmodel.Result, error) { RecordRangeAndInstantQueryMetrics(ctx, q.logger, q.params, strconv.Itoa(status), statResult, data) } + warnings := metadataCtx.Warnings() + _ = warnings + return logqlmodel.Result{ Data: data, Statistics: statResult, Headers: metadataCtx.Headers(), + Warnings: metadataCtx.Warnings(), }, err } diff --git a/pkg/logqlmodel/logqlmodel.go b/pkg/logqlmodel/logqlmodel.go index 8ba0e198c403..2a57cab2751c 100644 --- a/pkg/logqlmodel/logqlmodel.go +++ b/pkg/logqlmodel/logqlmodel.go @@ -20,6 +20,7 @@ type Result struct { Data parser.Value Statistics stats.Result Headers []*definitions.PrometheusResponseHeader + Warnings []string } // Streams is promql.Value diff --git a/pkg/logqlmodel/metadata/context.go b/pkg/logqlmodel/metadata/context.go index b819893679a4..2f3bbfa2683b 100644 --- a/pkg/logqlmodel/metadata/context.go +++ b/pkg/logqlmodel/metadata/context.go @@ -27,14 +27,16 @@ var ( // Context is the metadata context. It is passed through the query path and accumulates metadata. type Context struct { - mtx sync.Mutex - headers map[string][]string + mtx sync.Mutex + headers map[string][]string + warnings map[string]struct{} } // NewContext creates a new metadata context func NewContext(ctx context.Context) (*Context, context.Context) { contextData := &Context{ - headers: map[string][]string{}, + headers: map[string][]string{}, + warnings: map[string]struct{}{}, } ctx = context.WithValue(ctx, metadataKey, contextData) return contextData, ctx @@ -45,7 +47,8 @@ func FromContext(ctx context.Context) *Context { v, ok := ctx.Value(metadataKey).(*Context) if !ok { return &Context{ - headers: map[string][]string{}, + headers: map[string][]string{}, + warnings: map[string]struct{}{}, } } return v @@ -72,6 +75,28 @@ func (c *Context) Headers() []*definitions.PrometheusResponseHeader { return headers } +func (c *Context) Warnings() []string { + c.mtx.Lock() + defer c.mtx.Unlock() + + warnings := make([]string, 0, len(c.warnings)) + for warning := range c.warnings { + warnings = append(warnings, warning) + } + + sort.Strings(warnings) + + return warnings +} + +func (c *Context) Reset() { + c.mtx.Lock() + defer c.mtx.Unlock() + + clear(c.headers) + clear(c.warnings) +} + // JoinHeaders merges a Headers with the embedded Headers in a context in a concurrency-safe manner. // JoinHeaders will consolidate all distinct headers but will override same-named headers in an // undefined way @@ -94,3 +119,19 @@ func ExtendHeaders(dst map[string][]string, src []*definitions.PrometheusRespons dst[header.Name] = header.Values } } + +func AddWarnings(ctx context.Context, warnings ...string) error { + context, ok := ctx.Value(metadataKey).(*Context) + if !ok { + return ErrNoCtxData + } + + context.mtx.Lock() + defer context.mtx.Unlock() + + for _, w := range warnings { + context.warnings[w] = struct{}{} + } + + return nil +} diff --git a/pkg/querier/queryrange/codec.go b/pkg/querier/queryrange/codec.go index 6bcfb03b3336..48194c2dedd0 100644 --- a/pkg/querier/queryrange/codec.go +++ b/pkg/querier/queryrange/codec.go @@ -1070,7 +1070,6 @@ func decodeResponseJSON(r *http.Response, req queryrangebase.Request) (queryrang } func decodeResponseJSONFrom(buf []byte, req queryrangebase.Request, headers http.Header) (queryrangebase.Response, error) { - switch req := req.(type) { case *LokiSeriesRequest: var resp LokiSeriesResponse @@ -1145,7 +1144,8 @@ func decodeResponseJSONFrom(buf []byte, req queryrangebase.Request, headers http ResultType: loghttp.ResultTypeMatrix, Result: toProtoMatrix(resp.Data.Result.(loghttp.Matrix)), }, - Headers: convertPrometheusResponseHeadersToPointers(httpResponseHeadersToPromResponseHeaders(headers)), + Headers: convertPrometheusResponseHeadersToPointers(httpResponseHeadersToPromResponseHeaders(headers)), + Warnings: resp.Warnings, }, Statistics: resp.Data.Statistics, }, nil @@ -1175,7 +1175,8 @@ func decodeResponseJSONFrom(buf []byte, req queryrangebase.Request, headers http ResultType: loghttp.ResultTypeStream, Result: resp.Data.Result.(loghttp.Streams).ToProto(), }, - Headers: httpResponseHeadersToPromResponseHeaders(headers), + Headers: httpResponseHeadersToPromResponseHeaders(headers), + Warnings: resp.Warnings, }, nil case loghttp.ResultTypeVector: return &LokiPromResponse{ @@ -1185,7 +1186,8 @@ func decodeResponseJSONFrom(buf []byte, req queryrangebase.Request, headers http ResultType: loghttp.ResultTypeVector, Result: toProtoVector(resp.Data.Result.(loghttp.Vector)), }, - Headers: convertPrometheusResponseHeadersToPointers(httpResponseHeadersToPromResponseHeaders(headers)), + Headers: convertPrometheusResponseHeadersToPointers(httpResponseHeadersToPromResponseHeaders(headers)), + Warnings: resp.Warnings, }, Statistics: resp.Data.Statistics, }, nil @@ -1197,7 +1199,8 @@ func decodeResponseJSONFrom(buf []byte, req queryrangebase.Request, headers http ResultType: loghttp.ResultTypeScalar, Result: toProtoScalar(resp.Data.Result.(loghttp.Scalar)), }, - Headers: convertPrometheusResponseHeadersToPointers(httpResponseHeadersToPromResponseHeaders(headers)), + Headers: convertPrometheusResponseHeadersToPointers(httpResponseHeadersToPromResponseHeaders(headers)), + Warnings: resp.Warnings, }, Statistics: resp.Data.Statistics, }, nil @@ -1311,7 +1314,7 @@ func encodeResponseJSONTo(version loghttp.Version, res queryrangebase.Response, return err } } else { - if err := marshal.WriteQueryResponseJSON(logqlmodel.Streams(streams), response.Statistics, w, encodeFlags); err != nil { + if err := marshal.WriteQueryResponseJSON(logqlmodel.Streams(streams), response.Warnings, response.Statistics, w, encodeFlags); err != nil { return err } } @@ -1962,10 +1965,27 @@ func mergeLokiResponse(responses ...queryrangebase.Response) *LokiResponse { lokiResponses = make([]*LokiResponse, 0, len(responses)) ) + uniqueWarnings := map[string]struct{}{} for _, res := range responses { lokiResult := res.(*LokiResponse) mergedStats.MergeSplit(lokiResult.Statistics) lokiResponses = append(lokiResponses, lokiResult) + + for _, w := range lokiResult.Warnings { + uniqueWarnings[w] = struct{}{} + } + } + + warnings := make([]string, 0, len(uniqueWarnings)) + for w := range uniqueWarnings { + warnings = append(warnings, w) + } + sort.Strings(warnings) + + if len(warnings) == 0 { + // When there are no warnings, keep it nil so it can be compared against + // the default value + warnings = nil } return &LokiResponse{ @@ -1976,6 +1996,7 @@ func mergeLokiResponse(responses ...queryrangebase.Response) *LokiResponse { ErrorType: lokiRes.ErrorType, Error: lokiRes.Error, Statistics: mergedStats, + Warnings: warnings, Data: LokiData{ ResultType: loghttp.ResultTypeStream, Result: mergeOrderedNonOverlappingStreams(lokiResponses, lokiRes.Limit, lokiRes.Direction), diff --git a/pkg/querier/queryrange/codec_test.go b/pkg/querier/queryrange/codec_test.go index cdc95865e12c..215b66c03f8a 100644 --- a/pkg/querier/queryrange/codec_test.go +++ b/pkg/querier/queryrange/codec_test.go @@ -1174,6 +1174,7 @@ func Test_codec_MergeResponse(t *testing.T) { []queryrangebase.Response{ &LokiResponse{ Status: loghttp.QueryStatusSuccess, + Warnings: []string{"warning"}, Direction: logproto.BACKWARD, Limit: 100, Version: 1, @@ -1226,6 +1227,7 @@ func Test_codec_MergeResponse(t *testing.T) { }, &LokiResponse{ Status: loghttp.QueryStatusSuccess, + Warnings: []string{"warning"}, Direction: logproto.BACKWARD, Limit: 100, Version: 1, diff --git a/pkg/querier/queryrange/marshal.go b/pkg/querier/queryrange/marshal.go index 3640012f88a2..bf468dc4ea9a 100644 --- a/pkg/querier/queryrange/marshal.go +++ b/pkg/querier/queryrange/marshal.go @@ -72,6 +72,7 @@ func ResultToResponse(result logqlmodel.Result, params logql.Params) (queryrange ResultType: loghttp.ResultTypeVector, Result: sampleStream, }, + Warnings: result.Warnings, }, Statistics: result.Statistics, }, nil @@ -87,6 +88,7 @@ func ResultToResponse(result logqlmodel.Result, params logql.Params) (queryrange ResultType: loghttp.ResultTypeMatrix, Result: sampleStream, }, + Warnings: result.Warnings, }, Statistics: result.Statistics, }, nil @@ -103,6 +105,7 @@ func ResultToResponse(result logqlmodel.Result, params logql.Params) (queryrange ResultType: loghttp.ResultTypeScalar, Result: sampleStream, }, + Warnings: result.Warnings, }, Statistics: result.Statistics, }, nil @@ -115,15 +118,22 @@ func ResultToResponse(result logqlmodel.Result, params logql.Params) (queryrange Result: data, }, Status: "success", + Warnings: result.Warnings, Statistics: result.Statistics, }, nil case sketch.TopKMatrix: sk, err := data.ToProto() - return &TopKSketchesResponse{Response: sk}, err + return &TopKSketchesResponse{ + Response: sk, + Warnings: result.Warnings, + }, err case logql.ProbabilisticQuantileMatrix: r := data.ToProto() data.Release() - return &QuantileSketchResponse{Response: r}, nil + return &QuantileSketchResponse{ + Response: r, + Warnings: result.Warnings, + }, nil } return nil, fmt.Errorf("unsupported data type: %T", result.Data) @@ -146,6 +156,7 @@ func ResponseToResult(resp queryrangebase.Response) (logqlmodel.Result, error) { Statistics: r.Statistics, Data: streams, Headers: resp.GetHeaders(), + Warnings: r.Warnings, }, nil case *LokiPromResponse: @@ -157,12 +168,14 @@ func ResponseToResult(resp queryrangebase.Response) (logqlmodel.Result, error) { Statistics: r.Statistics, Data: sampleStreamToVector(r.Response.Data.Result), Headers: resp.GetHeaders(), + Warnings: r.Response.Warnings, }, nil } return logqlmodel.Result{ Statistics: r.Statistics, Data: sampleStreamToMatrix(r.Response.Data.Result), Headers: resp.GetHeaders(), + Warnings: r.Response.Warnings, }, nil case *TopKSketchesResponse: matrix, err := sketch.TopKMatrixFromProto(r.Response) @@ -171,8 +184,9 @@ func ResponseToResult(resp queryrangebase.Response) (logqlmodel.Result, error) { } return logqlmodel.Result{ - Data: matrix, - Headers: resp.GetHeaders(), + Data: matrix, + Headers: resp.GetHeaders(), + Warnings: r.Warnings, }, nil case *QuantileSketchResponse: matrix, err := logql.ProbabilisticQuantileMatrixFromProto(r.Response) @@ -180,8 +194,9 @@ func ResponseToResult(resp queryrangebase.Response) (logqlmodel.Result, error) { return logqlmodel.Result{}, fmt.Errorf("cannot decode quantile sketch: %w", err) } return logqlmodel.Result{ - Data: matrix, - Headers: resp.GetHeaders(), + Data: matrix, + Headers: resp.GetHeaders(), + Warnings: r.Warnings, }, nil default: return logqlmodel.Result{}, fmt.Errorf("cannot decode (%T)", resp) diff --git a/pkg/querier/queryrange/prometheus.go b/pkg/querier/queryrange/prometheus.go index 2a8ff78c164e..5d244d538fdd 100644 --- a/pkg/querier/queryrange/prometheus.go +++ b/pkg/querier/queryrange/prometheus.go @@ -100,6 +100,7 @@ func (p *LokiPromResponse) marshalVector() ([]byte, error) { Value: model.SampleValue(v.Samples[0].Value), } } + return jsonStd.Marshal(struct { Status string `json:"status"` Data struct { @@ -107,8 +108,9 @@ func (p *LokiPromResponse) marshalVector() ([]byte, error) { Result loghttp.Vector `json:"result"` Statistics stats.Result `json:"stats,omitempty"` } `json:"data,omitempty"` - ErrorType string `json:"errorType,omitempty"` - Error string `json:"error,omitempty"` + ErrorType string `json:"errorType,omitempty"` + Error string `json:"error,omitempty"` + Warnings []string `json:"warnings,omitempty"` }{ Error: p.Response.Error, Data: struct { @@ -122,6 +124,7 @@ func (p *LokiPromResponse) marshalVector() ([]byte, error) { }, ErrorType: p.Response.ErrorType, Status: p.Response.Status, + Warnings: p.Response.Warnings, }) } @@ -139,8 +142,9 @@ func (p *LokiPromResponse) marshalMatrix() ([]byte, error) { queryrangebase.PrometheusData Statistics stats.Result `json:"stats,omitempty"` } `json:"data,omitempty"` - ErrorType string `json:"errorType,omitempty"` - Error string `json:"error,omitempty"` + ErrorType string `json:"errorType,omitempty"` + Error string `json:"error,omitempty"` + Warnings []string `json:"warnings,omitempty"` }{ Error: p.Response.Error, Data: struct { @@ -152,6 +156,7 @@ func (p *LokiPromResponse) marshalMatrix() ([]byte, error) { }, ErrorType: p.Response.ErrorType, Status: p.Response.Status, + Warnings: p.Response.Warnings, }) } @@ -177,8 +182,9 @@ func (p *LokiPromResponse) marshalScalar() ([]byte, error) { Result loghttp.Scalar `json:"result"` Statistics stats.Result `json:"stats,omitempty"` } `json:"data,omitempty"` - ErrorType string `json:"errorType,omitempty"` - Error string `json:"error,omitempty"` + ErrorType string `json:"errorType,omitempty"` + Error string `json:"error,omitempty"` + Warnings []string `json:"warnings,omitempty"` }{ Error: p.Response.Error, Data: struct { @@ -192,5 +198,6 @@ func (p *LokiPromResponse) marshalScalar() ([]byte, error) { }, ErrorType: p.Response.ErrorType, Status: p.Response.Status, + Warnings: p.Response.Warnings, }) } diff --git a/pkg/querier/queryrange/prometheus_test.go b/pkg/querier/queryrange/prometheus_test.go index a5bea2868425..c17e62e3ec25 100644 --- a/pkg/querier/queryrange/prometheus_test.go +++ b/pkg/querier/queryrange/prometheus_test.go @@ -173,7 +173,8 @@ func Test_encodePromResponse(t *testing.T) { "matrix", &LokiPromResponse{ Response: &queryrangebase.PrometheusResponse{ - Status: string(queryrangebase.StatusSuccess), + Status: queryrangebase.StatusSuccess, + Warnings: []string{"this is a warning"}, Data: queryrangebase.PrometheusData{ ResultType: loghttp.ResultTypeMatrix, Result: []queryrangebase.SampleStream{ @@ -201,6 +202,7 @@ func Test_encodePromResponse(t *testing.T) { }, `{ "status": "success", + "warnings": ["this is a warning"], "data": { "resultType": "matrix", "result": [ @@ -221,7 +223,8 @@ func Test_encodePromResponse(t *testing.T) { "vector", &LokiPromResponse{ Response: &queryrangebase.PrometheusResponse{ - Status: string(queryrangebase.StatusSuccess), + Status: queryrangebase.StatusSuccess, + Warnings: []string{"this is a warning"}, Data: queryrangebase.PrometheusData{ ResultType: loghttp.ResultTypeVector, Result: []queryrangebase.SampleStream{ @@ -247,6 +250,7 @@ func Test_encodePromResponse(t *testing.T) { }, `{ "status": "success", + "warnings": ["this is a warning"], "data": { "resultType": "vector", "result": [ diff --git a/pkg/querier/queryrange/queryrange.pb.go b/pkg/querier/queryrange/queryrange.pb.go index 2312afbd71e7..11ad9e3c0c66 100644 --- a/pkg/querier/queryrange/queryrange.pb.go +++ b/pkg/querier/queryrange/queryrange.pb.go @@ -286,6 +286,7 @@ type LokiResponse struct { Version uint32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` Statistics stats.Result `protobuf:"bytes,8,opt,name=statistics,proto3" json:"statistics"` Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,9,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Warnings []string `protobuf:"bytes,10,rep,name=warnings,proto3" json:"warnings,omitempty"` } func (m *LokiResponse) Reset() { *m = LokiResponse{} } @@ -376,6 +377,13 @@ func (m *LokiResponse) GetStatistics() stats.Result { return stats.Result{} } +func (m *LokiResponse) GetWarnings() []string { + if m != nil { + return m.Warnings + } + return nil +} + type LokiSeriesRequest struct { Match []string `protobuf:"bytes,1,rep,name=match,proto3" json:"match,omitempty"` StartTs time.Time `protobuf:"bytes,2,opt,name=startTs,proto3,stdtime" json:"startTs"` @@ -760,6 +768,7 @@ var xxx_messageInfo_VolumeResponse proto.InternalMessageInfo type TopKSketchesResponse struct { Response *github_com_grafana_loki_pkg_logproto.TopKMatrix `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.TopKMatrix" json:"response,omitempty"` Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Warnings []string `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` } func (m *TopKSketchesResponse) Reset() { *m = TopKSketchesResponse{} } @@ -794,9 +803,17 @@ func (m *TopKSketchesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_TopKSketchesResponse proto.InternalMessageInfo +func (m *TopKSketchesResponse) GetWarnings() []string { + if m != nil { + return m.Warnings + } + return nil +} + type QuantileSketchResponse struct { Response *github_com_grafana_loki_pkg_logproto.QuantileSketchMatrix `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.QuantileSketchMatrix" json:"response,omitempty"` Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Warnings []string `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` } func (m *QuantileSketchResponse) Reset() { *m = QuantileSketchResponse{} } @@ -831,6 +848,13 @@ func (m *QuantileSketchResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuantileSketchResponse proto.InternalMessageInfo +func (m *QuantileSketchResponse) GetWarnings() []string { + if m != nil { + return m.Warnings + } + return nil +} + type ShardsResponse struct { Response *github_com_grafana_loki_pkg_logproto.ShardsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.ShardsResponse" json:"response,omitempty"` Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` @@ -1363,114 +1387,116 @@ func init() { } var fileDescriptor_51b9d53b40d11902 = []byte{ - // 1712 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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0xb5, 0x50, 0x2d, 0x65, 0x0b, 0x73, 0xb8, 0x0c, 0xb2, 0x7e, 0xe0, 0xb5, 0x64, 0x39, 0x7c, 0x6a, - 0xf0, 0x99, 0x6a, 0xfd, 0x58, 0x4b, 0xd9, 0xdc, 0x16, 0x9e, 0x67, 0x67, 0x57, 0x56, 0x78, 0x12, - 0x7e, 0x17, 0xc0, 0x6a, 0x8f, 0x01, 0x98, 0x02, 0x09, 0x4d, 0xe1, 0x79, 0x90, 0xdf, 0xe3, 0xf5, - 0x85, 0xbc, 0xc5, 0x59, 0x54, 0x41, 0xf1, 0xca, 0x83, 0xbd, 0x97, 0xb0, 0x85, 0x37, 0xc1, 0x14, - 0xf5, 0xfc, 0x9d, 0xf0, 0x4b, 0x2e, 0xef, 0x11, 0xca, 0x2a, 0x76, 0xd8, 0x97, 0xbe, 0x96, 0xb2, - 0x63, 0x38, 0x78, 0x07, 0xcc, 0xee, 0xc6, 0xbe, 0x37, 0x98, 0xf0, 0x6b, 0xc9, 0x01, 0x9e, 0x87, - 0x7f, 0x06, 0x6b, 0x29, 0x3b, 0x81, 0x86, 0xab, 0x60, 0x86, 0xc4, 0x92, 0xb0, 0xbc, 0xe7, 0x8b, - 0xbd, 0x57, 0x3c, 0x4d, 0xd7, 0x52, 0xf6, 0x00, 0x06, 0xde, 0x02, 0x33, 0x8d, 0x58, 0x26, 0xd2, - 0x27, 0x93, 0xbb, 0x1a, 0x9e, 0xab, 0xd8, 0x6a, 0x71, 0xac, 0xba, 0x9a, 0x08, 0x47, 0x7d, 0xea, - 0xe8, 0xd5, 0xe2, 0x01, 0xab, 0xae, 0x26, 0x66, 0x2c, 0xd0, 0xcf, 0x1b, 0x95, 0x6f, 0x73, 0x60, - 0x4a, 0x46, 0x85, 0xb8, 0xd6, 0xb8, 0x18, 0x09, 0x5d, 0x04, 0xc5, 0xe9, 0xa3, 0x84, 0xce, 0xcd, - 0x15, 0x9d, 0xff, 0x27, 0xd2, 0xb9, 0x88, 0x90, 0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- 0xa4, 0x7d, 0x72, 0x50, 0xd2, 0xbe, 0x3c, 0x28, 0x69, 0x8f, 0x0f, 0x4a, 0xda, 0x93, 0x83, 0x92, - 0xf6, 0xf3, 0x41, 0x49, 0xfb, 0xe5, 0xa0, 0x94, 0x7a, 0x71, 0x50, 0xd2, 0x1e, 0x3c, 0x2f, 0xa5, - 0x9e, 0x3c, 0x2f, 0xa5, 0x9e, 0x3e, 0x2f, 0xa5, 0x3e, 0x30, 0xc7, 0xfb, 0x02, 0x6d, 0xe6, 0x39, - 0x4d, 0x2b, 0xbf, 0x06, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x1e, 0xb8, 0x33, 0xfe, 0x1a, 0x00, 0x00, + // 1744 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x6f, 0x1b, 0xc7, + 0x19, 0xe7, 0xf2, 0x29, 0x8e, 0x1e, 0x55, 0xc7, 0x82, 0xbc, 0x55, 0x12, 0x2e, 0x41, 0xa0, 0x89, + 0x5a, 0xb4, 0xcb, 0x86, 0x4a, 0xed, 0xc4, 0x4e, 0x1f, 0xd9, 0xca, 0x06, 0x85, 0x3a, 0x85, 0xb3, + 0x12, 0x7a, 0x28, 0x7a, 0x19, 0x91, 0x23, 0x6a, 0xab, 0xe5, 0xee, 0x6a, 0x67, 0x28, 0x47, 0x87, + 0x02, 0xfd, 0x03, 0x5a, 0x20, 0x40, 0xff, 0x87, 0xa2, 0x87, 0x22, 0xa7, 0x9e, 0x7a, 0xeb, 0xa5, + 0xf5, 0xd1, 0xc7, 0x80, 0x40, 0x37, 0xb1, 0x7c, 0x29, 0x74, 0xf2, 0xa9, 0xe7, 0x62, 0x1e, 0xbb, + 0x9c, 0xe1, 0x52, 0x36, 0xe9, 0xa2, 0x40, 0xd4, 0xe6, 0x42, 0xce, 0xe3, 0xfb, 0xcd, 0xce, 0xfe, + 0xbe, 0xdf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 0x50, 0x80, + 0xda, 0x7e, 0x78, 0xe2, 0xb5, 0x55, 0x37, 0xb2, 0x55, 0xec, 0x8f, 0x18, 0x9a, 0xe1, 0x5c, 0xbe, + 0x6a, 0xeb, 0xef, 0x45, 0x00, 0x99, 0xc3, 0xf6, 0x02, 0x42, 0x51, 0x40, 0x5f, 0xc5, 0x6f, 0xef, + 0x83, 0x2a, 0x8b, 0x89, 0x03, 0xc2, 0x3d, 0x37, 0x2f, 0x91, 0x12, 0xa3, 0x33, 0x59, 0x5e, 0x88, + 0xc9, 0xca, 0x4c, 0x26, 0xab, 0x2f, 0x65, 0xb2, 0xf6, 0x5f, 0x61, 0xd2, 0x04, 0x65, 0xd6, 0x83, + 0xeb, 0xa0, 0x14, 0xa3, 0x47, 0x9c, 0xb8, 0x15, 0x97, 0x35, 0x5b, 0x9f, 0x97, 0xc1, 0x8a, 0x08, + 0x0a, 0x12, 0x85, 0x01, 0xc1, 0x6c, 0xb3, 0xfb, 0x3c, 0xf3, 0x08, 0x7a, 0xe5, 0x66, 0xf9, 0x88, + 0x2b, 0x67, 0xe0, 0x8f, 0x41, 0x79, 0x17, 0x51, 0xc4, 0xa9, 0x5e, 0xee, 0x6c, 0xa8, 0x9b, 0x65, + 0x6b, 0xb1, 0x39, 0x67, 0x93, 0xb1, 0x79, 0x99, 0x58, 0x6b, 0x7d, 0x44, 0xd1, 0x77, 0xc2, 0xa1, + 0x47, 0xf1, 0x30, 0xa2, 0xe7, 0x2e, 0x47, 0xc2, 0xef, 0x83, 0xfa, 0xbd, 0x38, 0x0e, 0xe3, 0x83, + 0xf3, 0x08, 0x73, 0xd7, 0xd4, 0x9d, 0x9b, 0x97, 0x89, 0x75, 0x03, 0xa7, 0x83, 0x0a, 0x62, 0x62, + 0x09, 0xbf, 0x05, 0x2a, 0xbc, 0xc3, 0x9d, 0x51, 0x77, 0x6e, 0x5c, 0x26, 0xd6, 0xd7, 0x38, 0x44, + 0x31, 0x17, 0x16, 0xba, 0xef, 0x2a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, 0x8a, 0xd7, 0x51, 0x70, 0x2f, 0xa7, 0x21, 0xa1, 0x6c, 0xeb, 0xea, 0xcf, 0x65, + 0xba, 0xd2, 0xb4, 0x80, 0xf6, 0x72, 0x02, 0x02, 0x57, 0x2d, 0x95, 0xca, 0x27, 0xb7, 0x94, 0x98, + 0x80, 0x5d, 0xb0, 0x34, 0xc4, 0x14, 0xf5, 0x11, 0x45, 0x66, 0x8d, 0xa7, 0xfd, 0x37, 0xf5, 0x48, + 0x9b, 0x88, 0xc9, 0xfe, 0x50, 0x1a, 0xde, 0x0b, 0x68, 0x7c, 0x2e, 0x8f, 0xa9, 0x19, 0x7a, 0xeb, + 0x2e, 0x58, 0xd5, 0x0c, 0xe0, 0x3a, 0x28, 0x9d, 0xe0, 0xf4, 0xf6, 0x9d, 0x35, 0xe1, 0x06, 0xa8, + 0x9c, 0x21, 0x7f, 0x84, 0xb9, 0xa6, 0xea, 0xae, 0xe8, 0xdc, 0x29, 0xbe, 0x6b, 0x38, 0x75, 0x50, + 0x8b, 0xc5, 0x53, 0x9c, 0xfe, 0x93, 0xa7, 0x8d, 0xc2, 0x67, 0x4f, 0x1b, 0x85, 0xe7, 0x4f, 0x1b, + 0xc6, 0x6f, 0x2e, 0x1a, 0xc6, 0x1f, 0x2f, 0x1a, 0xc6, 0xe3, 0x8b, 0x86, 0xf1, 0xe4, 0xa2, 0x61, + 0x7c, 0x71, 0xd1, 0x30, 0xfe, 0x79, 0xd1, 0x28, 0x3c, 0xbf, 0x68, 0x18, 0x9f, 0x3c, 0x6b, 0x14, + 0x9e, 0x3c, 0x6b, 0x14, 0x3e, 0x7b, 0xd6, 0x28, 0xfc, 0xc2, 0x5e, 0xec, 0x0b, 0x74, 0x58, 0xe5, + 0x34, 0xed, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x30, 0x7f, 0x25, 0xa2, 0x9a, 0x1b, 0x00, 0x00, } func (this *LokiRequest) Equal(that interface{}) bool { @@ -1659,6 +1685,14 @@ func (this *LokiResponse) Equal(that interface{}) bool { return false } } + if len(this.Warnings) != len(that1.Warnings) { + return false + } + for i := range this.Warnings { + if this.Warnings[i] != that1.Warnings[i] { + return false + } + } return true } func (this *LokiSeriesRequest) Equal(that interface{}) bool { @@ -1964,6 +1998,14 @@ func (this *TopKSketchesResponse) Equal(that interface{}) bool { return false } } + if len(this.Warnings) != len(that1.Warnings) { + return false + } + for i := range this.Warnings { + if this.Warnings[i] != that1.Warnings[i] { + return false + } + } return true } func (this *QuantileSketchResponse) Equal(that interface{}) bool { @@ -2000,6 +2042,14 @@ func (this *QuantileSketchResponse) Equal(that interface{}) bool { return false } } + if len(this.Warnings) != len(that1.Warnings) { + return false + } + for i := range this.Warnings { + if this.Warnings[i] != that1.Warnings[i] { + return false + } + } return true } func (this *ShardsResponse) Equal(that interface{}) bool { @@ -2710,7 +2760,7 @@ func (this *LokiResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 13) + s := make([]string, 0, 14) s = append(s, "&queryrange.LokiResponse{") s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") s = append(s, "Data: "+strings.Replace(this.Data.GoString(), `&`, ``, 1)+",\n") @@ -2721,6 +2771,7 @@ func (this *LokiResponse) GoString() string { s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") s = append(s, "Statistics: "+strings.Replace(this.Statistics.GoString(), `&`, ``, 1)+",\n") s = append(s, "Headers: "+fmt.Sprintf("%#v", this.Headers)+",\n") + s = append(s, "Warnings: "+fmt.Sprintf("%#v", this.Warnings)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -2822,10 +2873,11 @@ func (this *TopKSketchesResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&queryrange.TopKSketchesResponse{") s = append(s, "Response: "+fmt.Sprintf("%#v", this.Response)+",\n") s = append(s, "Headers: "+fmt.Sprintf("%#v", this.Headers)+",\n") + s = append(s, "Warnings: "+fmt.Sprintf("%#v", this.Warnings)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -2833,10 +2885,11 @@ func (this *QuantileSketchResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&queryrange.QuantileSketchResponse{") s = append(s, "Response: "+fmt.Sprintf("%#v", this.Response)+",\n") s = append(s, "Headers: "+fmt.Sprintf("%#v", this.Headers)+",\n") + s = append(s, "Warnings: "+fmt.Sprintf("%#v", this.Warnings)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -3301,6 +3354,15 @@ func (m *LokiResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Warnings[iNdEx]) + copy(dAtA[i:], m.Warnings[iNdEx]) + i = encodeVarintQueryrange(dAtA, i, uint64(len(m.Warnings[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } if len(m.Headers) > 0 { for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { { @@ -3786,6 +3848,15 @@ func (m *TopKSketchesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Warnings[iNdEx]) + copy(dAtA[i:], m.Warnings[iNdEx]) + i = encodeVarintQueryrange(dAtA, i, uint64(len(m.Warnings[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if len(m.Headers) > 0 { for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { { @@ -3835,6 +3906,15 @@ func (m *QuantileSketchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Warnings[iNdEx]) + copy(dAtA[i:], m.Warnings[iNdEx]) + i = encodeVarintQueryrange(dAtA, i, uint64(len(m.Warnings[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if len(m.Headers) > 0 { for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { { @@ -4645,6 +4725,12 @@ func (m *LokiResponse) Size() (n int) { n += 1 + l + sovQueryrange(uint64(l)) } } + if len(m.Warnings) > 0 { + for _, s := range m.Warnings { + l = len(s) + n += 1 + l + sovQueryrange(uint64(l)) + } + } return n } @@ -4825,6 +4911,12 @@ func (m *TopKSketchesResponse) Size() (n int) { n += 1 + l + sovQueryrange(uint64(l)) } } + if len(m.Warnings) > 0 { + for _, s := range m.Warnings { + l = len(s) + n += 1 + l + sovQueryrange(uint64(l)) + } + } return n } @@ -4844,6 +4936,12 @@ func (m *QuantileSketchResponse) Size() (n int) { n += 1 + l + sovQueryrange(uint64(l)) } } + if len(m.Warnings) > 0 { + for _, s := range m.Warnings { + l = len(s) + n += 1 + l + sovQueryrange(uint64(l)) + } + } return n } @@ -5246,6 +5344,7 @@ func (this *LokiResponse) String() string { `Version:` + fmt.Sprintf("%v", this.Version) + `,`, `Statistics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Statistics), "Result", "stats.Result", 1), `&`, ``, 1) + `,`, `Headers:` + fmt.Sprintf("%v", this.Headers) + `,`, + `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, `}`, }, "") return s @@ -5348,6 +5447,7 @@ func (this *TopKSketchesResponse) String() string { s := strings.Join([]string{`&TopKSketchesResponse{`, `Response:` + fmt.Sprintf("%v", this.Response) + `,`, `Headers:` + fmt.Sprintf("%v", this.Headers) + `,`, + `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, `}`, }, "") return s @@ -5359,6 +5459,7 @@ func (this *QuantileSketchResponse) String() string { s := strings.Join([]string{`&QuantileSketchResponse{`, `Response:` + fmt.Sprintf("%v", this.Response) + `,`, `Headers:` + fmt.Sprintf("%v", this.Headers) + `,`, + `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, `}`, }, "") return s @@ -6588,6 +6689,38 @@ func (m *LokiResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQueryrange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQueryrange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQueryrange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQueryrange(dAtA[iNdEx:]) @@ -7821,6 +7954,38 @@ func (m *TopKSketchesResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQueryrange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQueryrange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQueryrange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQueryrange(dAtA[iNdEx:]) @@ -7944,6 +8109,38 @@ func (m *QuantileSketchResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQueryrange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQueryrange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQueryrange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQueryrange(dAtA[iNdEx:]) diff --git a/pkg/querier/queryrange/queryrange.proto b/pkg/querier/queryrange/queryrange.proto index 2513d1debb5e..0e4c4474e698 100644 --- a/pkg/querier/queryrange/queryrange.proto +++ b/pkg/querier/queryrange/queryrange.proto @@ -73,6 +73,7 @@ message LokiResponse { (gogoproto.jsontag) = "-", (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; + repeated string warnings = 10 [(gogoproto.jsontag) = "warnings,omitempty"]; } message LokiSeriesRequest { @@ -157,6 +158,7 @@ message TopKSketchesResponse { (gogoproto.jsontag) = "-", (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; + repeated string warnings = 3 [(gogoproto.jsontag) = "warnings,omitempty"]; } message QuantileSketchResponse { @@ -165,6 +167,7 @@ message QuantileSketchResponse { (gogoproto.jsontag) = "-", (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; + repeated string warnings = 3 [(gogoproto.jsontag) = "warnings,omitempty"]; } message ShardsResponse { diff --git a/pkg/querier/queryrange/queryrangebase/query_range.go b/pkg/querier/queryrange/queryrangebase/query_range.go index 5e8f0dd855ed..5cdc035ef054 100644 --- a/pkg/querier/queryrange/queryrangebase/query_range.go +++ b/pkg/querier/queryrange/queryrangebase/query_range.go @@ -164,8 +164,28 @@ func (p prometheusCodec) MergeResponse(responses ...Response) (Response, error) // Merge the responses. sort.Sort(byFirstTime(promResponses)) + uniqueWarnings := map[string]struct{}{} + for _, resp := range promResponses { + for _, w := range resp.Warnings { + uniqueWarnings[w] = struct{}{} + } + } + + warnings := make([]string, 0, len(uniqueWarnings)) + for w := range uniqueWarnings { + warnings = append(warnings, w) + } + sort.Strings(warnings) + + if len(warnings) == 0 { + // When there are no warnings, keep it nil so it can be compared against + // the default value + warnings = nil + } + response := PrometheusResponse{ - Status: StatusSuccess, + Status: StatusSuccess, + Warnings: warnings, Data: PrometheusData{ ResultType: p.resultType.String(), Result: matrixMerge(promResponses), diff --git a/pkg/querier/queryrange/queryrangebase/query_range_test.go b/pkg/querier/queryrange/queryrangebase/query_range_test.go index ada34f5aba89..98e814a67fa4 100644 --- a/pkg/querier/queryrange/queryrangebase/query_range_test.go +++ b/pkg/querier/queryrange/queryrangebase/query_range_test.go @@ -120,6 +120,7 @@ func TestMergeAPIResponses(t *testing.T) { name: "Basic merging of two responses.", input: []Response{ &PrometheusResponse{ + Warnings: []string{"warning1", "warning2"}, Data: PrometheusData{ ResultType: matrix, Result: []SampleStream{ @@ -134,6 +135,7 @@ func TestMergeAPIResponses(t *testing.T) { }, }, &PrometheusResponse{ + Warnings: []string{"warning2", "warning3"}, Data: PrometheusData{ ResultType: matrix, Result: []SampleStream{ @@ -149,7 +151,8 @@ func TestMergeAPIResponses(t *testing.T) { }, }, expected: &PrometheusResponse{ - Status: StatusSuccess, + Status: StatusSuccess, + Warnings: []string{"warning1", "warning2", "warning3"}, Data: PrometheusData{ ResultType: matrix, Result: []SampleStream{ diff --git a/pkg/querier/queryrange/queryrangebase/queryrange.pb.go b/pkg/querier/queryrange/queryrangebase/queryrange.pb.go index f908b3621dcf..1650b64b0180 100644 --- a/pkg/querier/queryrange/queryrangebase/queryrange.pb.go +++ b/pkg/querier/queryrange/queryrangebase/queryrange.pb.go @@ -139,6 +139,7 @@ type PrometheusResponse struct { ErrorType string `protobuf:"bytes,3,opt,name=ErrorType,proto3" json:"errorType,omitempty"` Error string `protobuf:"bytes,4,opt,name=Error,proto3" json:"error,omitempty"` Headers []*definitions.PrometheusResponseHeader `protobuf:"bytes,5,rep,name=Headers,proto3" json:"-"` + Warnings []string `protobuf:"bytes,6,rep,name=Warnings,proto3" json:"warnings,omitempty"` } func (m *PrometheusResponse) Reset() { *m = PrometheusResponse{} } @@ -208,6 +209,13 @@ func (m *PrometheusResponse) GetHeaders() []*definitions.PrometheusResponseHeade return nil } +func (m *PrometheusResponse) GetWarnings() []string { + if m != nil { + return m.Warnings + } + return nil +} + type PrometheusData struct { ResultType string `protobuf:"bytes,1,opt,name=ResultType,proto3" json:"resultType"` Result []SampleStream `protobuf:"bytes,2,rep,name=Result,proto3" json:"result"` @@ -315,54 +323,55 @@ func init() { } var fileDescriptor_4cc6a0c1d6b614c4 = []byte{ - // 739 bytes of a gzipped FileDescriptorProto + // 766 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x4f, 0xdb, 0x48, - 0x18, 0x8d, 0xc9, 0x2f, 0x32, 0xac, 0xb2, 0xda, 0x01, 0xb1, 0x5e, 0x16, 0x8d, 0xa3, 0x68, 0x57, - 0xca, 0x4a, 0x5b, 0xbb, 0xa5, 0x2a, 0x87, 0x4a, 0x48, 0xad, 0x81, 0xaa, 0x42, 0x48, 0x45, 0x86, - 0x53, 0x6f, 0x93, 0x64, 0x70, 0x2c, 0x6c, 0x8f, 0x99, 0x19, 0x23, 0xe5, 0xd6, 0x53, 0xcf, 0xdc, - 0xda, 0x3f, 0xa1, 0xa7, 0xfe, 0x1d, 0x1c, 0x39, 0xa2, 0x1e, 0xdc, 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x3e, 0xb3, 0xee, 0xf9, 0x01, 0x1f, 0xa6, 0x3d, 0xbb, 0x4f, + 0x22, 0xc7, 0xa7, 0xe8, 0x10, 0xc5, 0xc8, 0x09, 0xc9, 0x51, 0xe0, 0x94, 0xdf, 0x1d, 0x5b, 0xf2, + 0x1e, 0x0f, 0x50, 0xc2, 0x31, 0x15, 0x8d, 0x44, 0x98, 0xd3, 0xa0, 0xef, 0x15, 0xb7, 0xc1, 0x47, + 0xa0, 0xc1, 0x64, 0x1f, 0xac, 0x98, 0x67, 0x79, 0xf6, 0x62, 0xd5, 0xe6, 0xed, 0x24, 0x27, 0x28, + 0x4c, 0x31, 0xf3, 0x26, 0x34, 0x97, 0x9d, 0x5f, 0x9a, 0x95, 0x8b, 0x4b, 0xb3, 0x72, 0x7d, 0x69, + 0x6a, 0xaf, 0x72, 0x53, 0x7b, 0x97, 0x9b, 0xda, 0x59, 0x6e, 0x6a, 0xe7, 0xb9, 0xa9, 0x7d, 0xcc, + 0x4d, 0xed, 0x53, 0x6e, 0x56, 0xae, 0x73, 0x53, 0x3b, 0xbd, 0x32, 0x2b, 0xe7, 0x57, 0x66, 0xe5, + 0xe2, 0xca, 0xac, 0xbc, 0xd8, 0xf8, 0x56, 0xf3, 0xdf, 0x7d, 0x17, 0x7b, 0xba, 0xec, 0xf0, 0xfe, + 0xe7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0xe6, 0x50, 0x48, 0x03, 0x06, 0x00, 0x00, } func (this *PrometheusRequest) Equal(that interface{}) bool { @@ -454,6 +463,14 @@ func (this *PrometheusResponse) Equal(that interface{}) bool { return false } } + if len(this.Warnings) != len(that1.Warnings) { + return false + } + for i := range this.Warnings { + if this.Warnings[i] != that1.Warnings[i] { + return false + } + } return true } func (this *PrometheusData) Equal(that interface{}) bool { @@ -548,7 +565,7 @@ func (this *PrometheusResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 9) + s := make([]string, 0, 10) s = append(s, "&queryrangebase.PrometheusResponse{") s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") s = append(s, "Data: "+strings.Replace(this.Data.GoString(), `&`, ``, 1)+",\n") @@ -557,6 +574,7 @@ func (this *PrometheusResponse) GoString() string { if this.Headers != nil { s = append(s, "Headers: "+fmt.Sprintf("%#v", this.Headers)+",\n") } + s = append(s, "Warnings: "+fmt.Sprintf("%#v", this.Warnings)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -712,6 +730,15 @@ func (m *PrometheusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Warnings[iNdEx]) + copy(dAtA[i:], m.Warnings[iNdEx]) + i = encodeVarintQueryrange(dAtA, i, uint64(len(m.Warnings[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } if len(m.Headers) > 0 { for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { { @@ -926,6 +953,12 @@ func (m *PrometheusResponse) Size() (n int) { n += 1 + l + sovQueryrange(uint64(l)) } } + if len(m.Warnings) > 0 { + for _, s := range m.Warnings { + l = len(s) + n += 1 + l + sovQueryrange(uint64(l)) + } + } return n } @@ -1012,6 +1045,7 @@ func (this *PrometheusResponse) String() string { `ErrorType:` + fmt.Sprintf("%v", this.ErrorType) + `,`, `Error:` + fmt.Sprintf("%v", this.Error) + `,`, `Headers:` + repeatedStringForHeaders + `,`, + `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, `}`, }, "") return s @@ -1550,6 +1584,38 @@ func (m *PrometheusResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQueryrange + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQueryrange + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQueryrange + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQueryrange(dAtA[iNdEx:]) diff --git a/pkg/querier/queryrange/queryrangebase/queryrange.proto b/pkg/querier/queryrange/queryrangebase/queryrange.proto index 98ddaa2b7d2d..72c3a051f094 100644 --- a/pkg/querier/queryrange/queryrangebase/queryrange.proto +++ b/pkg/querier/queryrange/queryrangebase/queryrange.proto @@ -42,6 +42,7 @@ message PrometheusResponse { string ErrorType = 3 [(gogoproto.jsontag) = "errorType,omitempty"]; string Error = 4 [(gogoproto.jsontag) = "error,omitempty"]; repeated definitions.PrometheusResponseHeader Headers = 5 [(gogoproto.jsontag) = "-"]; + repeated string Warnings = 6 [(gogoproto.jsontag) = "warnings,omitempty"]; } message PrometheusData { diff --git a/pkg/querier/queryrange/queryrangebase/results_cache.go b/pkg/querier/queryrange/queryrangebase/results_cache.go index 3511fe0b7dd3..1c4a8fe06a89 100644 --- a/pkg/querier/queryrange/queryrangebase/results_cache.go +++ b/pkg/querier/queryrange/queryrangebase/results_cache.go @@ -74,7 +74,8 @@ type PrometheusResponseExtractor struct{} func (PrometheusResponseExtractor) Extract(start, end int64, res resultscache.Response, _, _ int64) resultscache.Response { promRes := res.(*PrometheusResponse) return &PrometheusResponse{ - Status: StatusSuccess, + Status: StatusSuccess, + Warnings: promRes.Warnings, Data: PrometheusData{ ResultType: promRes.Data.ResultType, Result: extractMatrix(start, end, promRes.Data.Result), @@ -88,7 +89,8 @@ func (PrometheusResponseExtractor) Extract(start, end int64, res resultscache.Re func (PrometheusResponseExtractor) ResponseWithoutHeaders(resp Response) Response { promRes := resp.(*PrometheusResponse) return &PrometheusResponse{ - Status: StatusSuccess, + Status: StatusSuccess, + Warnings: promRes.Warnings, Data: PrometheusData{ ResultType: promRes.Data.ResultType, Result: promRes.Data.Result, diff --git a/pkg/querier/queryrange/queryrangebase/results_cache_test.go b/pkg/querier/queryrange/queryrangebase/results_cache_test.go index 2ee599fab30a..b259919c7534 100644 --- a/pkg/querier/queryrange/queryrangebase/results_cache_test.go +++ b/pkg/querier/queryrange/queryrangebase/results_cache_test.go @@ -23,7 +23,7 @@ import ( const ( query = "/api/v1/query_range?end=1536716898&query=sum%28container_memory_rss%29+by+%28namespace%29&start=1536673680&step=120" - responseBody = `{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"foo":"bar"},"values":[[1536673680,"137"],[1536673780,"137"]]}]}}` + responseBody = `{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"foo":"bar"},"values":[[1536673680,"137"],[1536673780,"137"]]}]},"warnings":["this is a warning"]}` ) var ( @@ -55,7 +55,8 @@ var ( }, } parsedResponse = &PrometheusResponse{ - Status: "success", + Status: "success", + Warnings: []string{"this is a warning"}, Data: PrometheusData{ ResultType: model.ValMatrix.String(), Result: []SampleStream{ diff --git a/pkg/querier/queryrange/querysharding.go b/pkg/querier/queryrange/querysharding.go index 8a11c546a7b6..ab83eb97e05b 100644 --- a/pkg/querier/queryrange/querysharding.go +++ b/pkg/querier/queryrange/querysharding.go @@ -252,6 +252,7 @@ func (ast *astMapperware) Do(ctx context.Context, r queryrangebase.Request) (que return nil, err } + // TODO(tpatterson): add warnings to response switch res.Data.Type() { case parser.ValueTypeMatrix: return &LokiPromResponse{ @@ -261,7 +262,8 @@ func (ast *astMapperware) Do(ctx context.Context, r queryrangebase.Request) (que ResultType: loghttp.ResultTypeMatrix, Result: toProtoMatrix(value.(loghttp.Matrix)), }, - Headers: res.Headers, + Headers: res.Headers, + Warnings: res.Warnings, }, Statistics: res.Statistics, }, nil @@ -281,7 +283,8 @@ func (ast *astMapperware) Do(ctx context.Context, r queryrangebase.Request) (que ResultType: loghttp.ResultTypeStream, Result: value.(loghttp.Streams).ToProto(), }, - Headers: respHeaders, + Headers: respHeaders, + Warnings: res.Warnings, }, nil case parser.ValueTypeVector: return &LokiPromResponse{ @@ -292,7 +295,8 @@ func (ast *astMapperware) Do(ctx context.Context, r queryrangebase.Request) (que ResultType: loghttp.ResultTypeVector, Result: toProtoVector(value.(loghttp.Vector)), }, - Headers: res.Headers, + Headers: res.Headers, + Warnings: res.Warnings, }, }, nil default: diff --git a/pkg/util/marshal/marshal.go b/pkg/util/marshal/marshal.go index 08c90a348c2b..11b2fc6961b1 100644 --- a/pkg/util/marshal/marshal.go +++ b/pkg/util/marshal/marshal.go @@ -27,7 +27,7 @@ func WriteResponseJSON(r *http.Request, v any, w http.ResponseWriter) error { version := loghttp.GetVersion(r.RequestURI) encodeFlags := httpreq.ExtractEncodingFlags(r) if version == loghttp.VersionV1 { - return WriteQueryResponseJSON(result.Data, result.Statistics, w, encodeFlags) + return WriteQueryResponseJSON(result.Data, result.Warnings, result.Statistics, w, encodeFlags) } return marshal_legacy.WriteQueryResponseJSON(result, w) @@ -50,10 +50,10 @@ func WriteResponseJSON(r *http.Request, v any, w http.ResponseWriter) error { // WriteQueryResponseJSON marshals the promql.Value to v1 loghttp JSON and then // writes it to the provided io.Writer. -func WriteQueryResponseJSON(data parser.Value, statistics stats.Result, w io.Writer, encodeFlags httpreq.EncodingFlags) error { +func WriteQueryResponseJSON(data parser.Value, warnings []string, statistics stats.Result, w io.Writer, encodeFlags httpreq.EncodingFlags) error { s := jsoniter.ConfigFastest.BorrowStream(w) defer jsoniter.ConfigFastest.ReturnStream(s) - err := EncodeResult(data, statistics, s, encodeFlags) + err := EncodeResult(data, warnings, statistics, s, encodeFlags) if err != nil { return fmt.Errorf("could not write JSON response: %w", err) } diff --git a/pkg/util/marshal/marshal_test.go b/pkg/util/marshal/marshal_test.go index 7917be41dae7..246863a3e555 100644 --- a/pkg/util/marshal/marshal_test.go +++ b/pkg/util/marshal/marshal_test.go @@ -213,6 +213,7 @@ var queryTestWithEncodingFlags = []struct { encodingFlags: httpreq.NewEncodingFlags(httpreq.FlagCategorizeLabels), expected: fmt.Sprintf(`{ "status": "success", + "warnings": ["this is a warning"], "data": { "resultType": "streams", "encodingFlags": ["%s"], @@ -274,6 +275,7 @@ var queryTests = []struct { }, fmt.Sprintf(`{ "status": "success", + "warnings": ["this is a warning"], "data": { "resultType": "streams", "result": [ @@ -350,7 +352,8 @@ var queryTests = []struct { ], "stats" : %s }, - "status": "success" + "status": "success", + "warnings": ["this is a warning"] }`, emptyStats), }, // matrix test @@ -432,7 +435,8 @@ var queryTests = []struct { ], "stats" : %s }, - "status": "success" + "status": "success", + "warnings": ["this is a warning"] }`, emptyStats), }, } @@ -598,14 +602,14 @@ var tailTestWithEncodingFlags = []struct { func Test_WriteQueryResponseJSON(t *testing.T) { for i, queryTest := range queryTests { var b bytes.Buffer - err := WriteQueryResponseJSON(queryTest.actual, stats.Result{}, &b, nil) + err := WriteQueryResponseJSON(queryTest.actual, []string{"this is a warning"}, stats.Result{}, &b, nil) require.NoError(t, err) require.JSONEqf(t, queryTest.expected, b.String(), "Query Test %d failed", i) } for i, queryTest := range queryTestWithEncodingFlags { var b bytes.Buffer - err := WriteQueryResponseJSON(queryTest.actual, stats.Result{}, &b, queryTest.encodingFlags) + err := WriteQueryResponseJSON(queryTest.actual, []string{"this is a warning"}, stats.Result{}, &b, queryTest.encodingFlags) require.NoError(t, err) require.JSONEqf(t, queryTest.expected, b.String(), "Query Test %d failed", i) @@ -637,7 +641,7 @@ func Test_WriteQueryResponseJSONWithError(t *testing.T) { }, } var b bytes.Buffer - err := WriteQueryResponseJSON(broken.Data, stats.Result{}, &b, nil) + err := WriteQueryResponseJSON(broken.Data, nil, stats.Result{}, &b, nil) require.Error(t, err) } @@ -896,7 +900,7 @@ func Test_WriteQueryResponseJSON_EncodeFlags(t *testing.T) { } { t.Run(tc.name, func(t *testing.T) { var b bytes.Buffer - err := WriteQueryResponseJSON(inputStream, stats.Result{}, &b, tc.encodeFlags) + err := WriteQueryResponseJSON(inputStream, nil, stats.Result{}, &b, tc.encodeFlags) require.NoError(t, err) require.JSONEq(t, tc.expected, b.String()) }) @@ -1030,7 +1034,7 @@ func Benchmark_Encode(b *testing.B) { for n := 0; n < b.N; n++ { for _, queryTest := range queryTests { - require.NoError(b, WriteQueryResponseJSON(queryTest.actual, stats.Result{}, buf, nil)) + require.NoError(b, WriteQueryResponseJSON(queryTest.actual, nil, stats.Result{}, buf, nil)) buf.Reset() } } diff --git a/pkg/util/marshal/query.go b/pkg/util/marshal/query.go index 8f41915c720a..1cda832f9bdb 100644 --- a/pkg/util/marshal/query.go +++ b/pkg/util/marshal/query.go @@ -176,11 +176,25 @@ func NewMetric(l labels.Labels) model.Metric { return ret } -func EncodeResult(data parser.Value, statistics stats.Result, s *jsoniter.Stream, encodeFlags httpreq.EncodingFlags) error { +func EncodeResult(data parser.Value, warnings []string, statistics stats.Result, s *jsoniter.Stream, encodeFlags httpreq.EncodingFlags) error { s.WriteObjectStart() s.WriteObjectField("status") s.WriteString("success") + if len(warnings) > 0 { + s.WriteMore() + + s.WriteObjectField("warnings") + s.WriteArrayStart() + for i, w := range warnings { + s.WriteString(w) + if i < len(warnings)-1 { + s.WriteMore() + } + } + s.WriteArrayEnd() + } + s.WriteMore() s.WriteObjectField("data") err := encodeData(data, statistics, s, encodeFlags)