diff --git a/pkg/ingester/ingester.go b/pkg/ingester/ingester.go index 1c1f1e1d7b..244cd3b50d 100644 --- a/pkg/ingester/ingester.go +++ b/pkg/ingester/ingester.go @@ -12,6 +12,8 @@ import ( "sync" "time" + "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" + lokilog "github.com/grafana/loki/v3/pkg/logql/log" "github.com/go-kit/log" @@ -874,6 +876,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 +936,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 674cb8a76e..5463eb1653 100644 --- a/pkg/ingester/instance.go +++ b/pkg/ingester/instance.go @@ -10,6 +10,8 @@ import ( "syscall" "time" + "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" + "github.com/grafana/loki/v3/pkg/util/httpreq" "github.com/go-kit/log/level" @@ -981,6 +983,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) { @@ -999,6 +1002,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 @@ -1013,6 +1017,7 @@ func sendBatches(ctx context.Context, i iter.EntryIterator, queryServer QuerierQ } stats.Reset() + metadata.Reset() } return nil } @@ -1021,6 +1026,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 { @@ -1029,6 +1035,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 } @@ -1042,6 +1050,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 7c373ddeac..43394fbfe1 100644 --- a/pkg/iter/entry_iterator.go +++ b/pkg/iter/entry_iterator.go @@ -7,6 +7,8 @@ import ( "sync" "time" + "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/grafana/loki/v3/pkg/logqlmodel/stats" "github.com/grafana/loki/v3/pkg/util" @@ -379,6 +381,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 261b75a0b3..12947bbdf8 100644 --- a/pkg/iter/sample_iterator.go +++ b/pkg/iter/sample_iterator.go @@ -6,6 +6,8 @@ import ( "io" "sync" + "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/grafana/loki/v3/pkg/logqlmodel/stats" "github.com/grafana/loki/v3/pkg/util" @@ -490,6 +492,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 5d16aefc1e..8b135602b7 100644 --- a/pkg/loghttp/query.go +++ b/pkg/loghttp/query.go @@ -38,12 +38,16 @@ type QueryStatus string const ( QueryStatusSuccess = "success" QueryStatusFail = "fail" + // How much stack space to allocate for unescaping JSON strings; if a string longer + // than this needs to be escaped, it will result in a heap allocation + unescapeStackBufSize = 64 ) // 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 +55,17 @@ 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) { + if dataType == jsonparser.String { + warnings = append(warnings, unescapeJSONString(value)) + } + }); err != nil { + return err + } + + q.Warnings = warnings case "data": var responseData QueryResponseData if err := responseData.UnmarshalJSON(value); err != nil { @@ -62,6 +77,16 @@ func (q *QueryResponse) UnmarshalJSON(data []byte) error { }) } +func unescapeJSONString(b []byte) string { + var stackbuf [unescapeStackBufSize]byte // stack-allocated array for allocation-free unescaping of small strings + bU, err := jsonparser.Unescape(b, stackbuf[:]) + if err != nil { + return "" + } + + return string(bU) +} + // PushRequest models a log stream push but is unmarshalled to proto push format. type PushRequest struct { Streams []LogProtoStream `json:"streams"` diff --git a/pkg/logproto/logproto.pb.go b/pkg/logproto/logproto.pb.go index 7995f42735..c478e47e89 100644 --- a/pkg/logproto/logproto.pb.go +++ b/pkg/logproto/logproto.pb.go @@ -577,8 +577,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{} } @@ -620,9 +621,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{} } @@ -664,6 +673,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"` @@ -2999,167 +3015,168 @@ func init() { func init() { proto.RegisterFile("pkg/logproto/logproto.proto", fileDescriptor_c28a5f14f1f4c79a) } var fileDescriptor_c28a5f14f1f4c79a = []byte{ - // 2556 bytes of a gzipped FileDescriptorProto + // 2569 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x39, 0xcb, 0x6f, 0x1b, 0xc7, 0xf9, 0x5c, 0x72, 0xf9, 0xfa, 0x48, 0xc9, 0xd2, 0x88, 0x96, 0x09, 0xda, 0x21, 0x95, 0xc1, 0xef, 0x97, 0xa8, 0xb1, 0x23, 0xc6, 0x72, 0xed, 0x3a, 0x76, 0xdd, 0xd4, 0x94, 0x62, 0x45, 0xb6, 0xfc, 0xc8, 0x48, 0x71, 0xd2, 0xa2, 0x86, 0xb1, 0x22, 0x47, 0xd4, 0xc2, 0xe4, 0x2e, 0xbd, 0x3b, 0xb4, - 0x4d, 0xa0, 0x87, 0xfe, 0x03, 0x45, 0x03, 0xf4, 0x50, 0xf4, 0x52, 0xb4, 0x40, 0x81, 0x16, 0x29, - 0x7a, 0x29, 0x7a, 0x6e, 0x2f, 0x3d, 0xb8, 0x37, 0xf7, 0x16, 0xe4, 0xc0, 0xd6, 0xf2, 0xa5, 0xd0, - 0x29, 0x40, 0x6f, 0x39, 0x15, 0xf3, 0xd8, 0xa7, 0xc8, 0x3a, 0x54, 0x1c, 0x04, 0xbe, 0x90, 0x33, - 0xdf, 0x7c, 0xf3, 0xcd, 0x7c, 0x8f, 0xf9, 0x5e, 0x0b, 0xc7, 0x7b, 0xf7, 0xda, 0xf5, 0x8e, 0xdd, - 0xee, 0x39, 0x36, 0xb3, 0xfd, 0xc1, 0x92, 0xf8, 0x45, 0x39, 0x6f, 0x5e, 0x29, 0xb5, 0xed, 0xb6, - 0x2d, 0x71, 0xf8, 0x48, 0xae, 0x57, 0x6a, 0x6d, 0xdb, 0x6e, 0x77, 0x68, 0x5d, 0xcc, 0xb6, 0xfb, - 0x3b, 0x75, 0x66, 0x76, 0xa9, 0xcb, 0x8c, 0x6e, 0x4f, 0x21, 0x2c, 0x28, 0xea, 0xf7, 0x3b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, 0xf1, 0x78, 0x29, 0xf0, 0x80, 0x42, 0x29, 0xca, 0x03, 0xbe, 0x06, 0xba, 0x43, 0x77, 0xbc, - 0x50, 0x8d, 0x82, 0x93, 0x7d, 0x4c, 0xb1, 0x8e, 0xff, 0xa2, 0xc1, 0xcc, 0x1a, 0x65, 0xd1, 0x24, - 0xe8, 0x25, 0x52, 0x29, 0x7e, 0x0f, 0x66, 0x43, 0xf7, 0x57, 0xdc, 0x9f, 0x89, 0x65, 0x3e, 0x47, - 0x03, 0xfe, 0xd7, 0xad, 0x16, 0x7d, 0xa4, 0x8a, 0xc6, 0x68, 0xd2, 0x73, 0x0b, 0x0a, 0xa1, 0x45, - 0x74, 0x39, 0x96, 0xee, 0xcc, 0xc5, 0xda, 0x8e, 0x3c, 0x64, 0x37, 0x4a, 0x8a, 0x27, 0x59, 0x36, - 0xaa, 0x64, 0xd6, 0x4f, 0x0d, 0x36, 0x01, 0x09, 0x75, 0x09, 0xb2, 0xe1, 0xe0, 0x24, 0xa0, 0xd7, - 0xfc, 0xbc, 0xc7, 0x9f, 0xa3, 0x57, 0x41, 0x77, 0xec, 0x87, 0x5e, 0x1e, 0x3b, 0x15, 0x1c, 0x49, - 0xec, 0x87, 0x44, 0x2c, 0xe1, 0x8b, 0x90, 0x22, 0xf6, 0x43, 0x54, 0x05, 0x70, 0x0c, 0xab, 0x4d, - 0x6f, 0xfb, 0x15, 0x54, 0x91, 0x84, 0x20, 0x63, 0x12, 0x87, 0x15, 0x98, 0x0d, 0xdf, 0x48, 0xaa, - 0x7b, 0x09, 0xb2, 0xef, 0xf7, 0xc3, 0xe2, 0x2a, 0xc5, 0xc4, 0x25, 0x8b, 0x71, 0x0f, 0x89, 0xdb, - 0x0c, 0x04, 0x70, 0x74, 0x02, 0xf2, 0xcc, 0xd8, 0xee, 0xd0, 0x1b, 0x81, 0x9b, 0x0b, 0x00, 0x7c, - 0x95, 0x17, 0x7f, 0xb7, 0x43, 0x19, 0x50, 0x00, 0x40, 0x6f, 0xc0, 0x4c, 0x70, 0xe7, 0x5b, 0x0e, - 0xdd, 0x31, 0x1f, 0x09, 0x0d, 0x17, 0xc9, 0x01, 0x38, 0x5a, 0x84, 0x23, 0x01, 0x6c, 0x53, 0x64, - 0x1a, 0xba, 0x40, 0x8d, 0x83, 0xb9, 0x6c, 0x04, 0xbb, 0xef, 0xde, 0xef, 0x1b, 0x1d, 0xf1, 0xf8, - 0x8a, 0x24, 0x04, 0xc1, 0x7f, 0xd5, 0x60, 0x56, 0xaa, 0x9a, 0x97, 0xfd, 0x2f, 0xa3, 0xd5, 0xff, - 0x4e, 0x03, 0x14, 0xe6, 0x40, 0x99, 0xd6, 0xff, 0x87, 0xfb, 0x39, 0x3c, 0x95, 0x29, 0x88, 0x9a, - 0x56, 0x82, 0x82, 0x96, 0x0c, 0x86, 0x8c, 0x48, 0x87, 0x64, 0x71, 0xad, 0xcb, 0xa2, 0x59, 0x42, - 0x88, 0xfa, 0xe7, 0xb5, 0xfe, 0xf6, 0x80, 0x51, 0x57, 0x95, 0xbc, 0xa2, 0xd6, 0x17, 0x00, 0x22, - 0xff, 0xf8, 0x59, 0xd4, 0x62, 0xc2, 0x6a, 0xf4, 0xe0, 0x2c, 0x05, 0x22, 0xde, 0x00, 0xff, 0x21, - 0x09, 0x53, 0xb7, 0xed, 0x4e, 0x3f, 0x08, 0x8c, 0x2f, 0x53, 0xc0, 0x88, 0xd4, 0xe1, 0x69, 0xaf, - 0x0e, 0x47, 0xa0, 0xbb, 0x8c, 0xf6, 0x84, 0x65, 0xa5, 0x88, 0x18, 0x23, 0x0c, 0x45, 0x66, 0x38, - 0x6d, 0xca, 0x64, 0x75, 0x53, 0xce, 0x88, 0xb4, 0x33, 0x02, 0x43, 0x0b, 0x50, 0x30, 0xda, 0x6d, - 0x87, 0xb6, 0x0d, 0x46, 0x1b, 0x83, 0x72, 0x56, 0x1c, 0x16, 0x06, 0xe1, 0x8f, 0x60, 0xda, 0x13, - 0x96, 0x52, 0xe9, 0x5b, 0x90, 0x7d, 0x20, 0x20, 0x23, 0x7a, 0x5f, 0x12, 0x55, 0xb9, 0x31, 0x0f, - 0x2d, 0xda, 0x2e, 0xf7, 0xee, 0x8c, 0xaf, 0x42, 0x46, 0xa2, 0xa3, 0x13, 0xe1, 0x1a, 0x45, 0x36, - 0x69, 0xf8, 0x5c, 0x15, 0x1c, 0x18, 0x32, 0x92, 0x90, 0x52, 0xbc, 0xb0, 0x0d, 0x09, 0x21, 0xea, - 0x1f, 0xff, 0x47, 0x83, 0xa3, 0xab, 0x94, 0xd1, 0x26, 0xa3, 0xad, 0x2b, 0x26, 0xed, 0xb4, 0xbe, - 0xd1, 0xf2, 0xd9, 0x6f, 0x82, 0xa5, 0x42, 0x4d, 0x30, 0xee, 0x77, 0x3a, 0xa6, 0x45, 0x37, 0x42, - 0x5d, 0x94, 0x00, 0xc0, 0x3d, 0xc4, 0x0e, 0xbf, 0xb8, 0x5c, 0x96, 0xdf, 0x27, 0x42, 0x10, 0x5f, - 0xc3, 0x99, 0x40, 0xc3, 0x78, 0x1d, 0xe6, 0xe3, 0x4c, 0x2b, 0x1d, 0xd5, 0x21, 0x23, 0xf6, 0x8e, - 0xe8, 0xa2, 0x46, 0x76, 0x10, 0x85, 0x86, 0x1d, 0x98, 0x8a, 0x2c, 0x08, 0x9d, 0x71, 0x1b, 0x51, - 0xfe, 0x53, 0x4e, 0xd0, 0xb7, 0x40, 0x67, 0x83, 0x9e, 0x72, 0x9b, 0x8d, 0xa3, 0x5f, 0x0c, 0x6b, - 0xb3, 0x91, 0x6d, 0x5b, 0x83, 0x1e, 0x25, 0x02, 0x85, 0x9b, 0x56, 0xd3, 0x70, 0x5a, 0xa6, 0x65, - 0x74, 0x4c, 0x26, 0x45, 0xa1, 0x93, 0x30, 0x08, 0xff, 0x26, 0xa4, 0x34, 0x69, 0x8f, 0x87, 0x54, - 0x9a, 0x76, 0x68, 0xa5, 0x69, 0xcf, 0x51, 0x1a, 0xfe, 0x41, 0x20, 0x62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18, 0x96, 0x51, 0xef, 0xd8, + 0xf7, 0xcc, 0xfa, 0x83, 0x33, 0x75, 0xfe, 0x06, 0xef, 0xf7, 0xa9, 0x63, 0x52, 0xa7, 0xce, 0xc9, + 0x2c, 0x09, 0x95, 0xf0, 0xad, 0x44, 0x90, 0xbd, 0xaa, 0xe7, 0x32, 0x33, 0x59, 0xfc, 0x34, 0x09, + 0x68, 0xd3, 0xe8, 0xf6, 0x3a, 0x74, 0x22, 0x95, 0xf9, 0xca, 0x49, 0x1e, 0x5a, 0x39, 0xa9, 0x49, + 0x95, 0x13, 0x48, 0x5a, 0x9f, 0x4c, 0xd2, 0xe9, 0x2f, 0x2b, 0xe9, 0xcc, 0xd7, 0x22, 0x69, 0x5c, + 0x06, 0x9d, 0xcf, 0xb8, 0x53, 0x72, 0x8c, 0x87, 0x42, 0x9e, 0x45, 0xc2, 0x87, 0x78, 0x03, 0x32, + 0xf2, 0x2e, 0xa8, 0x12, 0x17, 0x78, 0xf4, 0x7d, 0x04, 0xc2, 0x4e, 0x79, 0x62, 0x9c, 0x09, 0xc4, + 0x98, 0x12, 0x02, 0xc2, 0x7f, 0xd6, 0x60, 0x4a, 0x69, 0x51, 0xf9, 0x98, 0x6d, 0xc8, 0xca, 0x37, + 0xee, 0xf9, 0x97, 0x63, 0x71, 0xff, 0x72, 0xb9, 0x65, 0xf4, 0x18, 0x75, 0x1a, 0xf5, 0xc7, 0xc3, + 0x9a, 0xf6, 0xd9, 0xb0, 0xf6, 0xfa, 0x38, 0x46, 0x3d, 0x9f, 0xee, 0xf9, 0x25, 0x8f, 0x30, 0x3a, + 0x29, 0x6e, 0xc7, 0x5c, 0x65, 0x0a, 0x47, 0x96, 0x64, 0x28, 0x58, 0xb7, 0xda, 0xd4, 0xe5, 0x94, + 0x75, 0xae, 0x45, 0x22, 0x71, 0x38, 0x9b, 0x0f, 0x0d, 0xc7, 0x32, 0xad, 0xb6, 0x5b, 0x4e, 0x09, + 0xdf, 0xe9, 0xcf, 0xf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7d, 0xa4, 0x0a, 0xca, 0x68, 0xd2, 0x73, 0x0b, 0x0a, 0xa1, 0x45, 0x74, 0x39, 0x96, + 0xee, 0xcc, 0xc5, 0xfa, 0x95, 0x3c, 0x64, 0x37, 0x4a, 0x8a, 0x27, 0x59, 0x36, 0xaa, 0x64, 0xd6, + 0x4f, 0x0d, 0x36, 0x01, 0x09, 0x75, 0x09, 0xb2, 0xe1, 0xe0, 0x24, 0xa0, 0xd7, 0xfc, 0xbc, 0xc7, + 0x9f, 0xa3, 0x57, 0x41, 0x77, 0xec, 0x87, 0x5e, 0x1e, 0x3b, 0x15, 0x1c, 0x49, 0xec, 0x87, 0x44, + 0x2c, 0xe1, 0x8b, 0x90, 0x22, 0xf6, 0x43, 0x54, 0x05, 0x70, 0x0c, 0xab, 0x4d, 0x6f, 0xfb, 0x15, + 0x54, 0x91, 0x84, 0x20, 0x63, 0x12, 0x87, 0x15, 0x98, 0x0d, 0xdf, 0x48, 0xaa, 0x7b, 0x09, 0xb2, + 0xef, 0xf7, 0xc3, 0xe2, 0x2a, 0xc5, 0xc4, 0x25, 0x0b, 0x75, 0x0f, 0x89, 0xdb, 0x0c, 0x04, 0x70, + 0x74, 0x02, 0xf2, 0xcc, 0xd8, 0xee, 0xd0, 0x1b, 0x81, 0x9b, 0x0b, 0x00, 0x7c, 0x95, 0x17, 0x7f, + 0xb7, 0x43, 0x19, 0x50, 0x00, 0x40, 0x6f, 0xc0, 0x4c, 0x70, 0xe7, 0x5b, 0x0e, 0xdd, 0x31, 0x1f, + 0x09, 0x0d, 0x17, 0xc9, 0x01, 0x38, 0x5a, 0x84, 0x23, 0x01, 0x6c, 0x53, 0x64, 0x1a, 0xba, 0x40, + 0x8d, 0x83, 0xb9, 0x6c, 0x04, 0xbb, 0xef, 0xde, 0xef, 0x1b, 0x1d, 0xf1, 0xf8, 0x8a, 0x24, 0x04, + 0xc1, 0x7f, 0xd5, 0x60, 0x56, 0xaa, 0x9a, 0x19, 0xec, 0xa5, 0xb4, 0xfa, 0xdf, 0x6a, 0x80, 0xc2, + 0x1c, 0x28, 0xd3, 0xfa, 0xff, 0x70, 0x23, 0x88, 0xa7, 0x32, 0x05, 0x51, 0xd3, 0x4a, 0x50, 0xd0, + 0xcb, 0xc1, 0x90, 0x11, 0xe9, 0x90, 0x2c, 0xae, 0x75, 0x59, 0x34, 0x4b, 0x08, 0x51, 0xff, 0xbc, + 0xd6, 0xdf, 0x1e, 0x30, 0xea, 0xaa, 0x92, 0x57, 0xd4, 0xfa, 0x02, 0x40, 0xe4, 0x1f, 0x3f, 0x8b, + 0x5a, 0x4c, 0x58, 0x8d, 0x1e, 0x9c, 0xa5, 0x40, 0xc4, 0x1b, 0xe0, 0xdf, 0x27, 0x61, 0xea, 0xb6, + 0xdd, 0xe9, 0x07, 0x81, 0xf1, 0x65, 0x0a, 0x18, 0x91, 0x3a, 0x3c, 0xed, 0xd5, 0xe1, 0x08, 0x74, + 0x97, 0xd1, 0x9e, 0xb0, 0xac, 0x14, 0x11, 0x63, 0x84, 0xa1, 0xc8, 0x0c, 0xa7, 0x4d, 0x99, 0xac, + 0x6e, 0xca, 0x19, 0x91, 0x76, 0x46, 0x60, 0x68, 0x01, 0x0a, 0x46, 0xbb, 0xed, 0xd0, 0xb6, 0xc1, + 0x68, 0x63, 0x50, 0xce, 0x8a, 0xc3, 0xc2, 0x20, 0xfc, 0x11, 0x4c, 0x7b, 0xc2, 0x52, 0x2a, 0x7d, + 0x0b, 0xb2, 0x0f, 0x04, 0x64, 0x44, 0x5f, 0x4c, 0xa2, 0x2a, 0x37, 0xe6, 0xa1, 0x45, 0xfb, 0xec, + 0xde, 0x9d, 0xf1, 0x55, 0xc8, 0x48, 0x74, 0x74, 0x22, 0x5c, 0xa3, 0xc8, 0x26, 0x0d, 0x9f, 0xab, + 0x82, 0x03, 0x43, 0x46, 0x12, 0x52, 0x8a, 0x17, 0xb6, 0x21, 0x21, 0x44, 0xfd, 0xe3, 0xff, 0x68, + 0x70, 0x74, 0x95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2a, + 0x54, 0x1b, 0xe3, 0x93, 0xfc, 0x7b, 0x2d, 0x8c, 0x47, 0xf0, 0x29, 0x7f, 0x18, 0xa1, 0xac, 0xa2, + 0x5a, 0x6d, 0xcc, 0x13, 0xf4, 0x29, 0xd7, 0x9e, 0xf3, 0xa5, 0x1f, 0x27, 0x96, 0xef, 0x78, 0x1f, + 0xbb, 0x57, 0x0d, 0x66, 0xa0, 0x9b, 0x30, 0x2d, 0x64, 0xe9, 0x7f, 0x0d, 0x8f, 0xd8, 0xfc, 0x81, + 0x4f, 0xef, 0x11, 0x9b, 0x3f, 0xf8, 0x09, 0x1e, 0x27, 0x1a, 0x77, 0x9e, 0x3c, 0xad, 0x26, 0x3e, + 0x7d, 0x5a, 0x4d, 0x7c, 0xfe, 0xb4, 0xaa, 0xfd, 0x78, 0xaf, 0xaa, 0xfd, 0x6e, 0xaf, 0xaa, 0x3d, + 0xde, 0xab, 0x6a, 0x4f, 0xf6, 0xaa, 0xda, 0xbf, 0xf6, 0xaa, 0xda, 0xbf, 0xf7, 0xaa, 0x89, 0xcf, + 0xf7, 0xaa, 0xda, 0xc7, 0xcf, 0xaa, 0x89, 0x27, 0xcf, 0xaa, 0x89, 0x4f, 0x9f, 0x55, 0x13, 0x3f, + 0x7c, 0xfd, 0xf9, 0xe5, 0x9f, 0x74, 0x74, 0x19, 0xf1, 0x77, 0xe6, 0xbf, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x78, 0xeb, 0x77, 0xf7, 0x92, 0x21, 0x00, 0x00, } func (x Direction) String() string { @@ -3509,6 +3526,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 { @@ -3541,6 +3566,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 { @@ -5022,10 +5055,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, "") } @@ -5033,10 +5067,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, "") } @@ -6644,6 +6679,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 { @@ -6691,6 +6735,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 { @@ -8763,6 +8816,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 } @@ -8780,6 +8839,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 } @@ -9736,6 +9801,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 @@ -9747,6 +9813,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 @@ -11730,6 +11797,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:]) @@ -11850,6 +11949,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 eca6b0752f..b4986750a2 100644 --- a/pkg/logproto/logproto.proto +++ b/pkg/logproto/logproto.proto @@ -112,6 +112,7 @@ message QueryResponse { (gogoproto.nullable) = true ]; stats.Ingester stats = 2 [(gogoproto.nullable) = false]; + repeated string warnings = 3; } message SampleQueryResponse { @@ -120,6 +121,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 613a99fc43..446433f9a9 100644 --- a/pkg/logql/accumulator.go +++ b/pkg/logql/accumulator.go @@ -7,6 +7,8 @@ import ( "sort" "time" + "golang.org/x/exp/maps" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/grafana/loki/v3/pkg/logqlmodel" "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" @@ -90,8 +92,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 +116,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 +357,11 @@ func (acc *AccumulatedStreams) Result() []logqlmodel.Result { ) } + warnings := maps.Keys(acc.warnings) + sort.Strings(warnings) + + res.Warnings = warnings + return []logqlmodel.Result{res} } @@ -367,6 +376,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 eea9b28d30..0640f00307 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 fd89591794..64ea77bb11 100644 --- a/pkg/logql/engine.go +++ b/pkg/logql/engine.go @@ -266,6 +266,7 @@ func (q *query) Exec(ctx context.Context) (logqlmodel.Result, error) { Data: data, Statistics: statResult, Headers: metadataCtx.Headers(), + Warnings: metadataCtx.Warnings(), }, err } diff --git a/pkg/logqlmodel/logqlmodel.go b/pkg/logqlmodel/logqlmodel.go index 8da990f0e7..d95148b5b2 100644 --- a/pkg/logqlmodel/logqlmodel.go +++ b/pkg/logqlmodel/logqlmodel.go @@ -21,6 +21,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 f4d7dca265..0e70b15be2 100644 --- a/pkg/logqlmodel/metadata/context.go +++ b/pkg/logqlmodel/metadata/context.go @@ -10,6 +10,8 @@ import ( "sort" "sync" + "golang.org/x/exp/maps" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" ) @@ -27,14 +29,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 +49,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 +77,24 @@ func (c *Context) Headers() []*definitions.PrometheusResponseHeader { return headers } +func (c *Context) Warnings() []string { + c.mtx.Lock() + defer c.mtx.Unlock() + + warnings := maps.Keys(c.warnings) + 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 +117,23 @@ func ExtendHeaders(dst map[string][]string, src []*definitions.PrometheusRespons dst[header.Name] = header.Values } } + +func AddWarnings(ctx context.Context, warnings ...string) error { + if len(warnings) == 0 { + return nil + } + + 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 7bc1913745..2d36eafc0a 100644 --- a/pkg/querier/queryrange/codec.go +++ b/pkg/querier/queryrange/codec.go @@ -14,6 +14,8 @@ import ( "strings" "time" + "golang.org/x/exp/maps" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" @@ -1158,7 +1160,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 @@ -1188,7 +1191,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{ @@ -1198,7 +1202,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 @@ -1210,7 +1215,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 @@ -1324,7 +1330,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 } } @@ -1977,10 +1983,24 @@ 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 := maps.Keys(uniqueWarnings) + 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{ @@ -1991,6 +2011,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 35a101cb59..b334ab5b06 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 cc8602d1ce..8dc1751f8d 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 22ee8b3c1d..d427937dfc 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 6e3a4ac3e4..9d47be945b 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 a602dcafcd..0b7f68b775 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_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,9,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/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_v3_pkg_logproto.TopKMatrix `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.TopKMatrix" json:"response,omitempty"` Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/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_v3_pkg_logproto.QuantileSketchMatrix `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.QuantileSketchMatrix" json:"response,omitempty"` Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/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_v3_pkg_logproto.ShardsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.ShardsResponse" json:"response,omitempty"` Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` @@ -1363,115 +1387,117 @@ func init() { } var fileDescriptor_51b9d53b40d11902 = []byte{ - // 1720 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6f, 0xdb, 0x46, - 0x1a, 0x16, 0xf5, 0x69, 0x8d, 0x3f, 0xd6, 0x3b, 0x36, 0x1c, 0xae, 0x93, 0x88, 0x82, 0x80, 0x4d, - 0xbc, 0x8b, 0x5d, 0x69, 0x23, 0x27, 0xde, 0xc4, 0x1b, 0x04, 0x09, 0xd7, 0x09, 0x64, 0x6c, 0xb2, - 0x48, 0x68, 0xa3, 0x87, 0x5e, 0x8a, 0xb1, 0x34, 0x96, 0x58, 0x53, 0x24, 0x4d, 0x8e, 0x9c, 0x18, - 0xe8, 0x21, 0x7f, 0xa0, 0x68, 0x80, 0xfe, 0x87, 0xa2, 0xa7, 0x16, 0x2d, 0x7a, 0xea, 0xa9, 0xbd, - 0x19, 0x05, 0x0a, 0xe4, 0x18, 0x08, 0xa8, 0xda, 0x38, 0x97, 0xc2, 0xa7, 0x00, 0xfd, 0x03, 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0xb6, 0x70, 0xb2, 0x36, 0x9e, 0x93, 0xc1, 0x18, 0x94, 0x3e, 0x4b, 0x81, - 0xe9, 0xfb, 0xce, 0x9e, 0x69, 0xe0, 0xfd, 0x0e, 0xf6, 0x09, 0x5c, 0x04, 0x19, 0x66, 0xa3, 0x2a, - 0x45, 0x65, 0x25, 0x6f, 0xf0, 0x0e, 0x1d, 0xb5, 0xcc, 0xb6, 0x49, 0xd4, 0x64, 0x51, 0x59, 0x99, - 0x35, 0x78, 0x07, 0x42, 0x90, 0xf6, 0x09, 0x76, 0xd5, 0x54, 0x51, 0x59, 0x49, 0x19, 0xac, 0x0d, - 0x97, 0xc1, 0x94, 0x69, 0x13, 0xec, 0x1d, 0x20, 0x4b, 0xcd, 0xb3, 0xf1, 0xb0, 0x0f, 0x6f, 0x81, - 0x9c, 0x4f, 0x90, 0x47, 0xb6, 0x7d, 0x35, 0x5d, 0x54, 0x56, 0xa6, 0xab, 0xcb, 0x65, 0x1e, 0xab, - 0x72, 0x10, 0xab, 0xf2, 0x76, 0x10, 0x2b, 0x7d, 0xea, 0xa8, 0xa7, 0x25, 0x9e, 0x7d, 0xaf, 0x29, - 0x46, 0x00, 0x82, 0xeb, 0x20, 0x83, 0xed, 0xc6, 0xb6, 0xaf, 0x66, 0x26, 0x40, 0x73, 0x08, 0xbc, - 0x02, 0xf2, 0x0d, 0xd3, 0xc3, 0x75, 0xca, 0x99, 0x9a, 0x2d, 0x2a, 0x2b, 0x73, 0xd5, 0x85, 0x72, - 0x18, 0xda, 0x8d, 0x60, 0xca, 0xe8, 0x5b, 0xd1, 0xd7, 0x73, 0x11, 0x69, 0xa9, 0x39, 0xc6, 0x04, - 0x6b, 0xc3, 0x12, 0xc8, 0xfa, 0x2d, 0xe4, 0x35, 0x7c, 0x75, 0xaa, 0x98, 0x5a, 0xc9, 0xeb, 0xe0, - 0xa4, 0xa7, 0x89, 0x11, 0x43, 0xfc, 0xc3, 0x77, 0x40, 0xda, 0xb5, 0x90, 0xad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 0xb4, 0x5b, 0xe3, 0xf2, 0x38, 0xdc, 0xc7, 0xef, 0x86, 0x4f, - 0x56, 0x39, 0x4e, 0xca, 0x67, 0x14, 0xf4, 0x66, 0x7c, 0x46, 0x7d, 0x9c, 0x69, 0x3e, 0x3f, 0xcc, - 0x82, 0x59, 0x76, 0xad, 0x10, 0xd2, 0xf8, 0x77, 0x20, 0x4a, 0x6d, 0xc1, 0x21, 0x0c, 0x8e, 0x67, - 0x9e, 0x5b, 0x2f, 0x6f, 0x89, 0x22, 0x9c, 0x5b, 0xc0, 0xeb, 0x20, 0xeb, 0xb3, 0x43, 0x90, 0xa8, - 0xa2, 0x0a, 0x83, 0x77, 0x06, 0xd1, 0xe3, 0x56, 0x2d, 0x61, 0x08, 0x7b, 0x78, 0x13, 0x64, 0x2d, - 0xc6, 0xa2, 0x38, 0x04, 0x96, 0x06, 0x91, 0xf1, 0x63, 0x01, 0x45, 0x73, 0x0c, 0x5c, 0x03, 0x19, - 0x56, 0xae, 0x89, 0xbb, 0xb8, 0xc8, 0x63, 0xe3, 0x45, 0x53, 0x2d, 0x61, 0x70, 0x73, 0x58, 0x05, - 0x69, 0xd7, 0x73, 0xda, 0xa2, 0x74, 0xbe, 0x30, 0xf8, 0x4c, 0xb9, 0xd6, 0xac, 0x25, 0x0c, 0x66, - 0x0b, 0xaf, 0xd2, 0xd3, 0x2e, 0x2d, 0x52, 0x7d, 0x76, 0x81, 0x40, 0x2b, 0x94, 0x01, 0x98, 0x04, - 0x09, 0x4c, 0xe1, 0x55, 0x90, 0x3d, 0x60, 0x25, 0x88, 0xb8, 0xfd, 0x59, 0x96, 0x41, 0xd1, 0xe2, - 0x84, 0xbe, 0x17, 0xb7, 0x85, 0xf7, 0xc0, 0x0c, 0x71, 0xdc, 0xbd, 0xe0, 0x4b, 0x2f, 0x2e, 0x1f, - 0x8a, 0x32, 0x76, 0x58, 0x25, 0x50, 0x4b, 0x18, 0x11, 0x1c, 0x7c, 0x08, 0xe6, 0xf7, 0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0x1b, 0xfd, 0xed, 0x0c, 0x3c, 0x0d, 0x0a, 0x68, 0x33, 0x26, 0x20, - 0x30, 0xca, 0x55, 0x20, 0x9f, 0x98, 0x2b, 0x3e, 0x01, 0x6b, 0x60, 0xaa, 0x8d, 0x09, 0x6a, 0x20, - 0x82, 0xd4, 0x1c, 0xdb, 0xf9, 0x2f, 0x45, 0x33, 0xad, 0x2f, 0xa6, 0xf2, 0x03, 0x61, 0x78, 0xd7, - 0x26, 0xde, 0xa1, 0x38, 0x6a, 0x86, 0xe8, 0xe5, 0xff, 0x80, 0xd9, 0x88, 0x01, 0x9c, 0x07, 0xa9, - 0x3d, 0x1c, 0xdc, 0x8c, 0xd3, 0x26, 0x5c, 0x04, 0x99, 0x03, 0x64, 0x75, 0x30, 0xd3, 0x54, 0xde, - 0xe0, 0x9d, 0xf5, 0xe4, 0x75, 0x45, 0xcf, 0x83, 0x9c, 0xc7, 0x9f, 0xa2, 0x37, 0x9f, 0xbf, 0x2c, - 0x24, 0x5e, 0xbc, 0x2c, 0x24, 0x5e, 0xbf, 0x2c, 0x28, 0x4f, 0x8f, 0x0b, 0xca, 0xc7, 0xc7, 0x05, - 0xe5, 0xe8, 0xb8, 0xa0, 0x3c, 0x3f, 0x2e, 0x28, 0x3f, 0x1c, 0x17, 0x94, 0x1f, 0x8f, 0x0b, 0x89, - 0xd7, 0xc7, 0x05, 0xe5, 0xd9, 0xab, 0x42, 0xe2, 0xf9, 0xab, 0x42, 0xe2, 0xc5, 0xab, 0x42, 0xe2, - 0xed, 0x2b, 0x13, 0x7f, 0x84, 0x76, 0xb2, 0x8c, 0xa9, 0xd5, 0x9f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x84, 0x24, 0xe9, 0xad, 0x3c, 0x1b, 0x00, 0x00, + // 1751 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0xdb, 0xc8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x90, 0x3b, 0x41, 0x56, 0x0f, 0x33, 0x4d, 0x15, 0x0d, + 0xfe, 0xb0, 0x9d, 0xbe, 0xad, 0xe8, 0x45, 0x50, 0xf0, 0xf8, 0x5b, 0xf4, 0xf6, 0x9b, 0x77, 0xa5, + 0xd4, 0xdb, 0x77, 0xa5, 0xd4, 0x87, 0x77, 0x25, 0xe5, 0xe5, 0xa0, 0xa4, 0xfc, 0x79, 0x50, 0x52, + 0x5e, 0x0f, 0x4a, 0xca, 0x9b, 0x41, 0x49, 0xf9, 0xdf, 0xa0, 0xa4, 0x7c, 0x32, 0x28, 0xa5, 0x3e, + 0x0c, 0x4a, 0xca, 0xab, 0xf7, 0xa5, 0xd4, 0x9b, 0xf7, 0xa5, 0xd4, 0xdb, 0xf7, 0xa5, 0xd4, 0xaf, + 0x6f, 0xcc, 0xfc, 0x23, 0x74, 0x90, 0x67, 0x4c, 0x6d, 0x7e, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x8e, + 0xd2, 0x3a, 0x43, 0xd8, 0x1b, 0x00, 0x00, } func (this *LokiRequest) Equal(that interface{}) bool { @@ -1660,6 +1686,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 { @@ -1965,6 +1999,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 { @@ -2001,6 +2043,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 { @@ -2711,7 +2761,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") @@ -2722,6 +2772,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, "") } @@ -2823,10 +2874,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, "") } @@ -2834,10 +2886,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, "") } @@ -3302,6 +3355,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-- { { @@ -3787,6 +3849,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-- { { @@ -3836,6 +3907,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-- { { @@ -4646,6 +4726,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 } @@ -4826,6 +4912,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 } @@ -4845,6 +4937,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 } @@ -5247,6 +5345,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 @@ -5349,6 +5448,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 @@ -5360,6 +5460,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 @@ -6589,6 +6690,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:]) @@ -7822,6 +7955,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:]) @@ -7945,6 +8110,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 01f4829852..211699e836 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/v3/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/v3/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/v3/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 6b33097c00..44ac64f021 100644 --- a/pkg/querier/queryrange/queryrangebase/query_range.go +++ b/pkg/querier/queryrange/queryrangebase/query_range.go @@ -11,6 +11,8 @@ import ( "strconv" "time" + "golang.org/x/exp/maps" + "github.com/gogo/status" "github.com/grafana/dskit/httpgrpc" jsoniter "github.com/json-iterator/go" @@ -164,8 +166,25 @@ 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 := maps.Keys(uniqueWarnings) + 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 4a723403fe..2a825c1017 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 caf71d1f83..2b1f7b9519 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{ - // 740 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x4f, 0xd4, 0x40, - 0x18, 0xdd, 0xb2, 0xbf, 0xd8, 0xc1, 0xac, 0x71, 0x20, 0x58, 0x91, 0xb4, 0x9b, 0x8d, 0x26, 0x6b, - 0xa2, 0xad, 0x01, 0xe5, 0x60, 0x62, 0x82, 0xe5, 0x47, 0x0c, 0x21, 0x91, 0x14, 0x4e, 0xde, 0x66, - 0x77, 0x87, 0x6e, 0x43, 0xdb, 0x29, 0x33, 0x53, 0x92, 0xbd, 0x79, 0xf2, 0xcc, 0x4d, 0xff, 0x04, - 0x4f, 0xfe, 0x1d, 0x24, 0x5e, 0x38, 0x12, 0x0f, 0x55, 0x96, 0x8b, 0xd9, 0x13, 0x7f, 0x82, 0x99, - 0x99, 0x2e, 0x74, 0x97, 0x10, 0xf4, 0xb4, 0xf3, 0xf5, 0x7b, 0xef, 0xcd, 0xfb, 0xde, 0xd7, 0x2d, - 0x58, 0x89, 0x0f, 0x3c, 0xfb, 0x30, 0xc1, 0xd4, 0xc7, 0x54, 0xfe, 0xf6, 0x29, 0x8a, 0x3c, 0x9c, - 0x3b, 0xb6, 0x11, 0xcb, 0x97, 0x56, 0x4c, 0x09, 0x27, 0xb0, 0x3e, 0x0e, 0x58, 0x98, 0xf3, 0x88, - 0x47, 0x64, 0xcb, 0x16, 0x27, 0x85, 0x5a, 0x30, 0x3c, 0x42, 0xbc, 0x00, 0xdb, 0xb2, 0x6a, 0x27, - 0xfb, 0x76, 0x37, 0xa1, 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0xd0, 0xfe, 0x0c, 0x8c, 0xc2, 0xe5, 0xc0, 0xd0, 0x8e, - 0x2f, 0x8c, 0xc2, 0xe9, 0x85, 0x51, 0x38, 0xbb, 0x30, 0x0a, 0x1f, 0x57, 0xef, 0xf0, 0x7f, 0xe7, - 0x97, 0xae, 0x5d, 0x91, 0x26, 0x97, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xae, 0xb0, 0xf3, 0xf9, - 0xd5, 0x05, 0x00, 0x00, + // 768 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0x8d, 0x9b, 0xc4, 0x69, 0xb6, 0x3f, 0xe5, 0x27, 0xb6, 0x55, 0x31, 0xa5, 0xb2, 0xa3, 0x08, + 0xa4, 0x20, 0x81, 0x8d, 0x5a, 0xe8, 0x01, 0x09, 0xa9, 0xb8, 0x7f, 0x84, 0xaa, 0x4a, 0x54, 0x6e, + 0x25, 0x24, 0x6e, 0x9b, 0x64, 0xeb, 0x58, 0xb5, 0xbd, 0xee, 0xee, 0xba, 0x28, 0x37, 0x4e, 0x9c, + 0x7b, 0x83, 0x8f, 0xc0, 0x47, 0xa9, 0xc4, 0xa5, 0xc7, 0x8a, 0x83, 0xa1, 0xee, 0x05, 0xe5, 0xd4, + 0x8f, 0x80, 0x76, 0xed, 0xb4, 0x4e, 0x0a, 0x2a, 0x9c, 0x3c, 0xb3, 0xf3, 0xde, 0xdb, 0x99, 0x37, + 0xd6, 0x82, 0x95, 0xe8, 0xc0, 0xb5, 0x0e, 0x63, 0x4c, 0x3d, 0x4c, 0xe5, 0x77, 0x40, 0x51, 0xe8, + 0xe2, 0x42, 0xd8, 0x41, 0xac, 0x98, 0x9a, 0x11, 0x25, 0x9c, 0xc0, 0xc6, 0x38, 0x60, 0x61, 0xce, + 0x25, 0x2e, 0x91, 0x25, 0x4b, 0x44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xd6, 0xf3, 0xc5, + 0x64, 0x72, 0x9f, 0x85, 0xdc, 0x88, 0x03, 0xe7, 0x40, 0x55, 0x5a, 0xaa, 0xa9, 0x72, 0xb6, 0x2c, + 0x81, 0x5b, 0xa0, 0x21, 0xbc, 0xf1, 0x42, 0xf7, 0x4d, 0x24, 0x0d, 0xd5, 0x6a, 0x52, 0x7b, 0xd1, + 0x2c, 0x3a, 0x67, 0xae, 0x8d, 0x61, 0xec, 0x8a, 0x90, 0x77, 0x26, 0x98, 0x70, 0x03, 0xd4, 0x5e, + 0x63, 0xd4, 0xc3, 0x94, 0x69, 0xd3, 0xcd, 0x72, 0x7b, 0x66, 0xe9, 0x81, 0x59, 0xdc, 0xd4, 0x0d, + 0xb7, 0x33, 0xb0, 0x5d, 0x1d, 0x26, 0x86, 0xf2, 0xc4, 0x19, 0x71, 0x5b, 0xe9, 0x14, 0x80, 0x45, + 0x2c, 0x8b, 0x48, 0xc8, 0x30, 0x6c, 0x01, 0x75, 0x97, 0x23, 0x1e, 0xb3, 0x6c, 0x39, 0x36, 0x18, + 0x26, 0x86, 0xca, 0xe4, 0x89, 0x93, 0x57, 0xe0, 0x16, 0xa8, 0xac, 0x23, 0x8e, 0xf2, 0x4d, 0xe9, + 0xe6, 0xf8, 0x3f, 0x54, 0xe8, 0x40, 0xa0, 0xec, 0x79, 0x31, 0xc5, 0x30, 0x31, 0x1a, 0x3d, 0xc4, + 0xd1, 0x63, 0x12, 0x78, 0x1c, 0x07, 0x11, 0x1f, 0x38, 0x52, 0x03, 0x3e, 0x07, 0xf5, 0x0d, 0x4a, + 0x09, 0xdd, 0x1b, 0x44, 0x58, 0x2e, 0xb0, 0x6e, 0xdf, 0x1d, 0x26, 0xc6, 0x2c, 0x1e, 0x1d, 0x16, + 0x18, 0xd7, 0x48, 0xf8, 0x08, 0x54, 0x65, 0x22, 0x57, 0x57, 0xb7, 0x67, 0x87, 0x89, 0xf1, 0xbf, + 0xa4, 0x14, 0xe0, 0x19, 0x02, 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, 0x27, 0xef, 0xce, 0x3a, 0xbd, 0x1e, + 0xe6, 0x08, 0xf9, 0x31, 0x66, 0xce, 0x88, 0x66, 0x1f, 0x9d, 0x9e, 0xeb, 0xa5, 0xb3, 0x73, 0xbd, + 0x74, 0x79, 0xae, 0x2b, 0x1f, 0x52, 0x5d, 0xf9, 0x92, 0xea, 0xca, 0x49, 0xaa, 0x2b, 0xa7, 0xa9, + 0xae, 0xfc, 0x48, 0x75, 0xe5, 0x67, 0xaa, 0x97, 0x2e, 0x53, 0x5d, 0x39, 0xbe, 0xd0, 0x4b, 0xa7, + 0x17, 0x7a, 0xe9, 0xec, 0x42, 0x2f, 0xbd, 0x5b, 0xbd, 0xa5, 0xff, 0x5b, 0x5f, 0xc7, 0x8e, 0x2a, + 0x9b, 0x5c, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x2e, 0x5a, 0xee, 0x09, 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 4d8e42016c..f20dbc795a 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 e519ae74f0..d65b9860f8 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 fa1d9c81ef..1453808d14 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 c67cd753a6..4d1f6abfee 100644 --- a/pkg/querier/queryrange/querysharding.go +++ b/pkg/querier/queryrange/querysharding.go @@ -261,7 +261,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 +282,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 +294,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 b720bfa557..dc99635cb0 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 ba2acf5ee8..380768d9cb 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 4591d851c5..7f06cd6ebe 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) diff --git a/vendor/golang.org/x/exp/maps/maps.go b/vendor/golang.org/x/exp/maps/maps.go new file mode 100644 index 0000000000..ecc0dabb74 --- /dev/null +++ b/vendor/golang.org/x/exp/maps/maps.go @@ -0,0 +1,94 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package maps defines various functions useful with maps of any type. +package maps + +// Keys returns the keys of the map m. +// The keys will be in an indeterminate order. +func Keys[M ~map[K]V, K comparable, V any](m M) []K { + r := make([]K, 0, len(m)) + for k := range m { + r = append(r, k) + } + return r +} + +// Values returns the values of the map m. +// The values will be in an indeterminate order. +func Values[M ~map[K]V, K comparable, V any](m M) []V { + r := make([]V, 0, len(m)) + for _, v := range m { + r = append(r, v) + } + return r +} + +// Equal reports whether two maps contain the same key/value pairs. +// Values are compared using ==. +func Equal[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool { + if len(m1) != len(m2) { + return false + } + for k, v1 := range m1 { + if v2, ok := m2[k]; !ok || v1 != v2 { + return false + } + } + return true +} + +// EqualFunc is like Equal, but compares values using eq. +// Keys are still compared with ==. +func EqualFunc[M1 ~map[K]V1, M2 ~map[K]V2, K comparable, V1, V2 any](m1 M1, m2 M2, eq func(V1, V2) bool) bool { + if len(m1) != len(m2) { + return false + } + for k, v1 := range m1 { + if v2, ok := m2[k]; !ok || !eq(v1, v2) { + return false + } + } + return true +} + +// Clear removes all entries from m, leaving it empty. +func Clear[M ~map[K]V, K comparable, V any](m M) { + for k := range m { + delete(m, k) + } +} + +// Clone returns a copy of m. This is a shallow clone: +// the new keys and values are set using ordinary assignment. +func Clone[M ~map[K]V, K comparable, V any](m M) M { + // Preserve nil in case it matters. + if m == nil { + return nil + } + r := make(M, len(m)) + for k, v := range m { + r[k] = v + } + return r +} + +// Copy copies all key/value pairs in src adding them to dst. +// When a key in src is already present in dst, +// the value in dst will be overwritten by the value associated +// with the key in src. +func Copy[M1 ~map[K]V, M2 ~map[K]V, K comparable, V any](dst M1, src M2) { + for k, v := range src { + dst[k] = v + } +} + +// DeleteFunc deletes any key/value pairs from m for which del returns true. +func DeleteFunc[M ~map[K]V, K comparable, V any](m M, del func(K, V) bool) { + for k, v := range m { + if del(k, v) { + delete(m, k) + } + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 9bbf3e0af8..0eefeb1974 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1633,6 +1633,7 @@ golang.org/x/crypto/sha3 # golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 ## explicit; go 1.20 golang.org/x/exp/constraints +golang.org/x/exp/maps golang.org/x/exp/slices # golang.org/x/mod v0.16.0 ## explicit; go 1.18