From bd2d28f03b7abd95f4ab1ec8b48226dd3064fbe7 Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Tue, 12 Dec 2023 13:30:59 -0500 Subject: [PATCH 1/9] Initial commit from experimental branch --- pkg/tempopb/tempo.pb.go | 7061 ++++++++++++++++++---------- pkg/tempopb/tempo.proto | 124 +- pkg/traceql/ast.go | 98 +- pkg/traceql/ast_conditions.go | 9 +- pkg/traceql/ast_stringer.go | 10 +- pkg/traceql/ast_validate.go | 13 +- pkg/traceql/combine.go | 44 + pkg/traceql/engine.go | 19 +- pkg/traceql/engine_metrics.go | 608 +++ pkg/traceql/engine_metrics_test.go | 156 + pkg/traceql/engine_test.go | 2 +- pkg/traceql/enum_aggregates.go | 18 + pkg/traceql/expr.y | 30 +- pkg/traceql/expr.y.go | 1019 ++-- pkg/traceql/lexer.go | 2 + pkg/traceql/parse_test.go | 73 +- pkg/traceql/storage.go | 19 + pkg/traceql/test_examples.yaml | 3 +- pkg/traceqlmetrics/metrics.go | 2 +- 19 files changed, 6254 insertions(+), 3056 deletions(-) create mode 100644 pkg/traceql/engine_metrics.go create mode 100644 pkg/traceql/engine_metrics_test.go diff --git a/pkg/tempopb/tempo.pb.go b/pkg/tempopb/tempo.pb.go index 323fc8de640..feaaf5ee40b 100644 --- a/pkg/tempopb/tempo.pb.go +++ b/pkg/tempopb/tempo.pb.go @@ -337,8 +337,8 @@ func (m *SearchRequest) GetSpansPerSpanSet() uint32 { return 0 } -// SearchBlockRequest takes SearchRequest parameters as well as all information necessary -// to search a block in the backend. +// SearchBlockRequest takes SearchRequest parameters as well as all information +// necessary to search a block in the backend. type SearchBlockRequest struct { SearchReq *SearchRequest `protobuf:"bytes,1,opt,name=searchReq,proto3" json:"searchReq,omitempty"` BlockID string `protobuf:"bytes,2,opt,name=blockID,proto3" json:"blockID,omitempty"` @@ -1353,7 +1353,8 @@ func (m *PushResponse) XXX_DiscardUnknown() { var xxx_messageInfo_PushResponse proto.InternalMessageInfo -// PushBytesRequest pushes slices of traces, ids and searchdata. Traces are encoded using the +// PushBytesRequest pushes slices of traces, ids and searchdata. Traces are +// encoded using the // current BatchDecoder in ./pkg/model type PushBytesRequest struct { // pre-marshalled Traces. length must match ids @@ -1487,9 +1488,10 @@ func (m *TraceBytes) GetTraces() [][]byte { return nil } -// this message exists for marshalling/unmarshalling convenience to/from parquet. in parquet we proto encode -// links to a column. unfortunately you can't encode a slice directly so we use this wrapper to generate -// the required marshalling/unmarshalling functions. +// this message exists for marshalling/unmarshalling convenience to/from +// parquet. in parquet we proto encode links to a column. unfortunately you +// can't encode a slice directly so we use this wrapper to generate the required +// marshalling/unmarshalling functions. type LinkSlice struct { Links []*v11.Span_Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` } @@ -1858,6 +1860,58 @@ func (m *KeyValue) GetValue() *TraceQLStatic { return nil } +type RawExemplar struct { + TraceID []byte `protobuf:"bytes,1,opt,name=traceID,proto3" json:"traceID,omitempty"` + Val uint64 `protobuf:"varint,2,opt,name=val,proto3" json:"val,omitempty"` +} + +func (m *RawExemplar) Reset() { *m = RawExemplar{} } +func (m *RawExemplar) String() string { return proto.CompactTextString(m) } +func (*RawExemplar) ProtoMessage() {} +func (*RawExemplar) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{30} +} +func (m *RawExemplar) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RawExemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RawExemplar.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RawExemplar) XXX_Merge(src proto.Message) { + xxx_messageInfo_RawExemplar.Merge(m, src) +} +func (m *RawExemplar) XXX_Size() int { + return m.Size() +} +func (m *RawExemplar) XXX_DiscardUnknown() { + xxx_messageInfo_RawExemplar.DiscardUnknown(m) +} + +var xxx_messageInfo_RawExemplar proto.InternalMessageInfo + +func (m *RawExemplar) GetTraceID() []byte { + if m != nil { + return m.TraceID + } + return nil +} + +func (m *RawExemplar) GetVal() uint64 { + if m != nil { + return m.Val + } + return 0 +} + type SpanMetrics struct { LatencyHistogram []*RawHistogram `protobuf:"bytes,1,rep,name=latency_histogram,json=latencyHistogram,proto3" json:"latency_histogram,omitempty"` Series []*KeyValue `protobuf:"bytes,2,rep,name=series,proto3" json:"series,omitempty"` @@ -1868,7 +1922,7 @@ func (m *SpanMetrics) Reset() { *m = SpanMetrics{} } func (m *SpanMetrics) String() string { return proto.CompactTextString(m) } func (*SpanMetrics) ProtoMessage() {} func (*SpanMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_f22805646f4f62b6, []int{30} + return fileDescriptor_f22805646f4f62b6, []int{31} } func (m *SpanMetrics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1932,7 +1986,7 @@ func (m *SpanMetricsSummary) Reset() { *m = SpanMetricsSummary{} } func (m *SpanMetricsSummary) String() string { return proto.CompactTextString(m) } func (*SpanMetricsSummary) ProtoMessage() {} func (*SpanMetricsSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_f22805646f4f62b6, []int{31} + return fileDescriptor_f22805646f4f62b6, []int{32} } func (m *SpanMetricsSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2018,7 +2072,7 @@ func (m *SpanMetricsSummaryResponse) Reset() { *m = SpanMetricsSummaryRe func (m *SpanMetricsSummaryResponse) String() string { return proto.CompactTextString(m) } func (*SpanMetricsSummaryResponse) ProtoMessage() {} func (*SpanMetricsSummaryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f22805646f4f62b6, []int{32} + return fileDescriptor_f22805646f4f62b6, []int{33} } func (m *SpanMetricsSummaryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2069,7 +2123,7 @@ func (m *TraceQLStatic) Reset() { *m = TraceQLStatic{} } func (m *TraceQLStatic) String() string { return proto.CompactTextString(m) } func (*TraceQLStatic) ProtoMessage() {} func (*TraceQLStatic) Descriptor() ([]byte, []int) { - return fileDescriptor_f22805646f4f62b6, []int{33} + return fileDescriptor_f22805646f4f62b6, []int{34} } func (m *TraceQLStatic) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2154,1063 +2208,1394 @@ func (m *TraceQLStatic) GetKind() int32 { return 0 } -func init() { - proto.RegisterEnum("tempopb.DedicatedColumn_Scope", DedicatedColumn_Scope_name, DedicatedColumn_Scope_value) - proto.RegisterEnum("tempopb.DedicatedColumn_Type", DedicatedColumn_Type_name, DedicatedColumn_Type_value) - proto.RegisterType((*TraceByIDRequest)(nil), "tempopb.TraceByIDRequest") - proto.RegisterType((*TraceByIDResponse)(nil), "tempopb.TraceByIDResponse") - proto.RegisterType((*TraceByIDMetrics)(nil), "tempopb.TraceByIDMetrics") - proto.RegisterType((*SearchRequest)(nil), "tempopb.SearchRequest") - proto.RegisterMapType((map[string]string)(nil), "tempopb.SearchRequest.TagsEntry") - proto.RegisterType((*SearchBlockRequest)(nil), "tempopb.SearchBlockRequest") - proto.RegisterType((*DedicatedColumn)(nil), "tempopb.DedicatedColumn") - proto.RegisterType((*SearchResponse)(nil), "tempopb.SearchResponse") - proto.RegisterType((*TraceSearchMetadata)(nil), "tempopb.TraceSearchMetadata") - proto.RegisterType((*SpanSet)(nil), "tempopb.SpanSet") - proto.RegisterType((*Span)(nil), "tempopb.Span") - proto.RegisterType((*SearchMetrics)(nil), "tempopb.SearchMetrics") - proto.RegisterType((*SearchTagsRequest)(nil), "tempopb.SearchTagsRequest") - proto.RegisterType((*SearchTagsResponse)(nil), "tempopb.SearchTagsResponse") - proto.RegisterType((*SearchTagsV2Response)(nil), "tempopb.SearchTagsV2Response") - proto.RegisterType((*SearchTagsV2Scope)(nil), "tempopb.SearchTagsV2Scope") - proto.RegisterType((*SearchTagValuesRequest)(nil), "tempopb.SearchTagValuesRequest") - proto.RegisterType((*SearchTagValuesResponse)(nil), "tempopb.SearchTagValuesResponse") - proto.RegisterType((*TagValue)(nil), "tempopb.TagValue") - proto.RegisterType((*SearchTagValuesV2Response)(nil), "tempopb.SearchTagValuesV2Response") - proto.RegisterType((*Trace)(nil), "tempopb.Trace") - proto.RegisterType((*PushResponse)(nil), "tempopb.PushResponse") - proto.RegisterType((*PushBytesRequest)(nil), "tempopb.PushBytesRequest") - proto.RegisterType((*PushSpansRequest)(nil), "tempopb.PushSpansRequest") - proto.RegisterType((*TraceBytes)(nil), "tempopb.TraceBytes") - proto.RegisterType((*LinkSlice)(nil), "tempopb.LinkSlice") - proto.RegisterType((*SpanMetricsRequest)(nil), "tempopb.SpanMetricsRequest") - proto.RegisterType((*SpanMetricsSummaryRequest)(nil), "tempopb.SpanMetricsSummaryRequest") - proto.RegisterType((*SpanMetricsResponse)(nil), "tempopb.SpanMetricsResponse") - proto.RegisterType((*RawHistogram)(nil), "tempopb.RawHistogram") - proto.RegisterType((*KeyValue)(nil), "tempopb.KeyValue") - proto.RegisterType((*SpanMetrics)(nil), "tempopb.SpanMetrics") - proto.RegisterType((*SpanMetricsSummary)(nil), "tempopb.SpanMetricsSummary") - proto.RegisterType((*SpanMetricsSummaryResponse)(nil), "tempopb.SpanMetricsSummaryResponse") - proto.RegisterType((*TraceQLStatic)(nil), "tempopb.TraceQLStatic") +type SpanMetricsData struct { + ResultType string `protobuf:"bytes,1,opt,name=resultType,proto3" json:"resultType,omitempty"` + Result []*SpanMetricsResult `protobuf:"bytes,2,rep,name=result,proto3" json:"result,omitempty"` } -func init() { proto.RegisterFile("pkg/tempopb/tempo.proto", fileDescriptor_f22805646f4f62b6) } - -var fileDescriptor_f22805646f4f62b6 = []byte{ - // 1996 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x8a, 0x7f, 0x44, 0x3e, 0x51, 0x32, 0x3d, 0x71, 0x64, 0x9a, 0x76, 0x24, 0x61, 0x63, - 0xb4, 0x4a, 0xe1, 0x50, 0x32, 0x63, 0x21, 0x75, 0x5c, 0xb4, 0x88, 0x2c, 0xd5, 0x96, 0x63, 0x39, - 0xf2, 0x50, 0x71, 0x81, 0x5e, 0x82, 0xe5, 0xee, 0x98, 0xde, 0x8a, 0xdc, 0x65, 0x76, 0x87, 0xaa, - 0xd9, 0x63, 0x81, 0x16, 0x28, 0xd0, 0x43, 0x0f, 0xed, 0xb5, 0x40, 0x4f, 0x41, 0x3f, 0x47, 0x81, - 0x22, 0x97, 0x16, 0x39, 0x16, 0x3d, 0x04, 0x85, 0xfd, 0x09, 0xfa, 0x0d, 0x8a, 0xf7, 0x66, 0x66, - 0xff, 0x90, 0x2b, 0x19, 0x69, 0x0f, 0x3d, 0x71, 0xde, 0x6f, 0x7e, 0xf3, 0xe6, 0xcd, 0x9b, 0x37, - 0xef, 0x3d, 0x2e, 0x5c, 0x1d, 0x9f, 0x0e, 0xb6, 0xa5, 0x18, 0x8d, 0xc3, 0x71, 0x5f, 0xfd, 0x76, - 0xc6, 0x51, 0x28, 0x43, 0xb6, 0xa4, 0xc1, 0xf6, 0x15, 0x19, 0x39, 0xae, 0xd8, 0x3e, 0xbb, 0xbd, - 0x4d, 0x03, 0x35, 0xdd, 0x5e, 0x73, 0xc3, 0xd1, 0x28, 0x0c, 0x10, 0x56, 0x23, 0x8d, 0xbf, 0x3f, - 0xf0, 0xe5, 0x8b, 0x49, 0xbf, 0xe3, 0x86, 0xa3, 0xed, 0x41, 0x38, 0x08, 0xb7, 0x09, 0xee, 0x4f, - 0x9e, 0x93, 0x44, 0x02, 0x8d, 0x14, 0xdd, 0xfe, 0xb5, 0x05, 0xcd, 0x13, 0x54, 0xbb, 0x37, 0x3d, - 0xdc, 0xe7, 0xe2, 0x8b, 0x89, 0x88, 0x25, 0x6b, 0xc1, 0x12, 0x6d, 0x75, 0xb8, 0xdf, 0xb2, 0x36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 0x59, 0x25, 0x20, 0x1a, 0xd3, 0x45, 0x54, 0x14, 0x4a, - 0x02, 0x6b, 0x42, 0x49, 0x04, 0x5e, 0xab, 0x4a, 0x18, 0x0e, 0x91, 0xf7, 0x14, 0x1d, 0xdd, 0xaa, - 0x91, 0xd7, 0x95, 0xc0, 0xb6, 0xe0, 0x52, 0x6f, 0xec, 0x04, 0xf1, 0xb1, 0x88, 0xf0, 0xb7, 0x27, - 0x64, 0xab, 0x4e, 0x6b, 0x66, 0xe1, 0xf6, 0x87, 0x50, 0x4f, 0x8e, 0x88, 0xea, 0x4f, 0xc5, 0x94, - 0x6e, 0xa4, 0xce, 0x71, 0x88, 0xea, 0xcf, 0x9c, 0xe1, 0x44, 0xe8, 0x78, 0x50, 0xc2, 0x47, 0x8b, - 0xdf, 0xb7, 0xec, 0xbf, 0x96, 0x80, 0x29, 0x57, 0xed, 0x61, 0x14, 0x18, 0xaf, 0xde, 0x81, 0x7a, - 0x6c, 0x1c, 0xa8, 0xaf, 0x76, 0xad, 0xd8, 0xb5, 0x3c, 0x25, 0x62, 0x54, 0x52, 0x2c, 0x1d, 0xee, - 0xeb, 0x8d, 0x8c, 0x88, 0x91, 0x45, 0x47, 0x3f, 0x76, 0x06, 0x42, 0xfb, 0x2f, 0x05, 0xd0, 0xc3, - 0x63, 0x67, 0x20, 0xe2, 0x93, 0x50, 0xa9, 0xd6, 0x3e, 0xcc, 0x83, 0x18, 0xb9, 0x22, 0x70, 0x43, - 0xcf, 0x0f, 0x06, 0x3a, 0x38, 0x13, 0x19, 0x35, 0xf8, 0x81, 0x27, 0x5e, 0xa2, 0xba, 0x9e, 0xff, - 0x0b, 0xa1, 0x7d, 0x9b, 0x07, 0x99, 0x0d, 0x0d, 0x19, 0x4a, 0x67, 0xc8, 0x85, 0x1b, 0x46, 0x5e, - 0xdc, 0x5a, 0x22, 0x52, 0x0e, 0x43, 0x8e, 0xe7, 0x48, 0xe7, 0xc0, 0xec, 0xa4, 0x2e, 0x24, 0x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x3c, 0x27, 0xdf, - 0x84, 0x15, 0xe3, 0x52, 0x94, 0x63, 0x7d, 0x1d, 0x79, 0x70, 0xe6, 0x14, 0x95, 0x6f, 0x77, 0x8a, - 0x7f, 0x5b, 0xa6, 0xa2, 0xe9, 0x90, 0xc4, 0xb8, 0xf2, 0x83, 0x78, 0x2c, 0x5c, 0x29, 0xbc, 0x13, - 0x13, 0xfa, 0x94, 0xf5, 0x67, 0x60, 0xf6, 0x1d, 0x58, 0x4d, 0xa0, 0xbd, 0x29, 0x6e, 0xbe, 0x48, - 0xf6, 0xcd, 0xa0, 0x6c, 0x13, 0x96, 0x29, 0xc7, 0x51, 0x8a, 0x37, 0xf5, 0x2b, 0x0b, 0xe1, 0x41, - 0xdd, 0x70, 0x34, 0x1e, 0x0a, 0x29, 0xbc, 0x47, 0x61, 0x3f, 0x36, 0x19, 0x38, 0x07, 0x62, 0x16, - 0xa7, 0x45, 0xc4, 0x50, 0x21, 0x97, 0x02, 0x68, 0x77, 0xaa, 0x52, 0x99, 0x53, 0x25, 0x73, 0x66, - 0x61, 0xfb, 0x3d, 0xb8, 0xac, 0x8e, 0x8c, 0x35, 0xcb, 0x94, 0x9c, 0x2b, 0x26, 0x59, 0xa9, 0x4b, - 0x54, 0x82, 0xbd, 0x63, 0xca, 0x93, 0xa2, 0xea, 0xa4, 0xd0, 0x86, 0x9a, 0x74, 0x06, 0xf8, 0x6a, - 0x54, 0xe4, 0xd5, 0x79, 0x22, 0xdb, 0x8f, 0xe0, 0x4a, 0xba, 0xe2, 0x59, 0x37, 0x59, 0xd3, 0x85, - 0x2a, 0xa9, 0x34, 0xb1, 0xda, 0x9e, 0xc9, 0x08, 0x8a, 0xae, 0x32, 0xa1, 0x66, 0xda, 0xf7, 0xb2, - 0x86, 0xea, 0xc9, 0x24, 0xac, 0xac, 0x4c, 0x58, 0x31, 0x28, 0x4b, 0xec, 0x42, 0x16, 0xc9, 0x18, - 0x1a, 0xdb, 0x0f, 0x61, 0x2d, 0x59, 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, 0x5c, 0xa2, 0xe8, 0x13, 0x73, 0x24, 0xd5, 0xe8, 0x5d, 0xa8, 0xea, 0x9d, 0xc2, 0xc6, 0x31, - 0xa3, 0xec, 0x19, 0x5c, 0x9a, 0xe9, 0x9f, 0xd8, 0xc6, 0xfc, 0x9a, 0x5c, 0x4b, 0xd8, 0xde, 0x3c, - 0x9f, 0x90, 0xe8, 0xfd, 0x69, 0xa6, 0x1b, 0x35, 0x7d, 0xd9, 0x9b, 0x35, 0xdb, 0xe7, 0x11, 0xb2, - 0x36, 0x77, 0x3f, 0x85, 0x66, 0x4f, 0x46, 0xc2, 0x19, 0xf9, 0xc1, 0xc0, 0x44, 0xcc, 0x3d, 0xa8, - 0xea, 0x4f, 0x2f, 0xdf, 0xf6, 0x86, 0x77, 0xac, 0xee, 0xcf, 0x60, 0xc9, 0x84, 0xf0, 0xe7, 0x85, - 0x59, 0xd7, 0xbe, 0x28, 0x17, 0x69, 0xfd, 0xef, 0x5e, 0xc8, 0x31, 0xc6, 0xef, 0xb5, 0xbe, 0x7a, - 0xb5, 0x6e, 0x7d, 0xfd, 0x6a, 0xdd, 0xfa, 0xd7, 0xab, 0x75, 0xeb, 0x77, 0xaf, 0xd7, 0x17, 0xbe, - 0x7e, 0xbd, 0xbe, 0xf0, 0x8f, 0xd7, 0xeb, 0x0b, 0xfd, 0x2a, 0x7d, 0x43, 0xfd, 0xe0, 0x3f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x1d, 0xf6, 0x35, 0x13, 0xc4, 0x15, 0x00, 0x00, +func (m *SpanMetricsData) Reset() { *m = SpanMetricsData{} } +func (m *SpanMetricsData) String() string { return proto.CompactTextString(m) } +func (*SpanMetricsData) ProtoMessage() {} +func (*SpanMetricsData) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{35} } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// PusherClient is the client API for Pusher service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PusherClient interface { - // different versions of PushBytes expect the trace data to be pushed in different formats - PushBytes(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) - PushBytesV2(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) +func (m *SpanMetricsData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -type pusherClient struct { - cc *grpc.ClientConn +func (m *SpanMetricsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpanMetricsData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } - -func NewPusherClient(cc *grpc.ClientConn) PusherClient { - return &pusherClient{cc} +func (m *SpanMetricsData) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanMetricsData.Merge(m, src) +} +func (m *SpanMetricsData) XXX_Size() int { + return m.Size() +} +func (m *SpanMetricsData) XXX_DiscardUnknown() { + xxx_messageInfo_SpanMetricsData.DiscardUnknown(m) } -func (c *pusherClient) PushBytes(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) { - out := new(PushResponse) - err := c.cc.Invoke(ctx, "/tempopb.Pusher/PushBytes", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_SpanMetricsData proto.InternalMessageInfo + +func (m *SpanMetricsData) GetResultType() string { + if m != nil { + return m.ResultType } - return out, nil + return "" } -func (c *pusherClient) PushBytesV2(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) { - out := new(PushResponse) - err := c.cc.Invoke(ctx, "/tempopb.Pusher/PushBytesV2", in, out, opts...) - if err != nil { - return nil, err +func (m *SpanMetricsData) GetResult() []*SpanMetricsResult { + if m != nil { + return m.Result } - return out, nil + return nil } -// PusherServer is the server API for Pusher service. -type PusherServer interface { - // different versions of PushBytes expect the trace data to be pushed in different formats - PushBytes(context.Context, *PushBytesRequest) (*PushResponse, error) - PushBytesV2(context.Context, *PushBytesRequest) (*PushResponse, error) +type SpanMetricsResult struct { + LabelName string `protobuf:"bytes,1,opt,name=labelName,proto3" json:"labelName,omitempty"` + LabelValue string `protobuf:"bytes,2,opt,name=labelValue,proto3" json:"labelValue,omitempty"` + Ts []*SpanMetricsResultPoint `protobuf:"bytes,3,rep,name=ts,proto3" json:"ts,omitempty"` } -// UnimplementedPusherServer can be embedded to have forward compatible implementations. -type UnimplementedPusherServer struct { +func (m *SpanMetricsResult) Reset() { *m = SpanMetricsResult{} } +func (m *SpanMetricsResult) String() string { return proto.CompactTextString(m) } +func (*SpanMetricsResult) ProtoMessage() {} +func (*SpanMetricsResult) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{36} } - -func (*UnimplementedPusherServer) PushBytes(ctx context.Context, req *PushBytesRequest) (*PushResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushBytes not implemented") +func (m *SpanMetricsResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedPusherServer) PushBytesV2(ctx context.Context, req *PushBytesRequest) (*PushResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushBytesV2 not implemented") +func (m *SpanMetricsResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpanMetricsResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } - -func RegisterPusherServer(s *grpc.Server, srv PusherServer) { - s.RegisterService(&_Pusher_serviceDesc, srv) +func (m *SpanMetricsResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanMetricsResult.Merge(m, src) +} +func (m *SpanMetricsResult) XXX_Size() int { + return m.Size() +} +func (m *SpanMetricsResult) XXX_DiscardUnknown() { + xxx_messageInfo_SpanMetricsResult.DiscardUnknown(m) } -func _Pusher_PushBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushBytesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PusherServer).PushBytes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Pusher/PushBytes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PusherServer).PushBytes(ctx, req.(*PushBytesRequest)) +var xxx_messageInfo_SpanMetricsResult proto.InternalMessageInfo + +func (m *SpanMetricsResult) GetLabelName() string { + if m != nil { + return m.LabelName } - return interceptor(ctx, in, info, handler) + return "" } -func _Pusher_PushBytesV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushBytesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PusherServer).PushBytesV2(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Pusher/PushBytesV2", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PusherServer).PushBytesV2(ctx, req.(*PushBytesRequest)) +func (m *SpanMetricsResult) GetLabelValue() string { + if m != nil { + return m.LabelValue } - return interceptor(ctx, in, info, handler) + return "" } -var _Pusher_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.Pusher", - HandlerType: (*PusherServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PushBytes", - Handler: _Pusher_PushBytes_Handler, - }, - { - MethodName: "PushBytesV2", - Handler: _Pusher_PushBytesV2_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "pkg/tempopb/tempo.proto", +func (m *SpanMetricsResult) GetTs() []*SpanMetricsResultPoint { + if m != nil { + return m.Ts + } + return nil } -// MetricsGeneratorClient is the client API for MetricsGenerator service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricsGeneratorClient interface { - PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) - GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) +type SpanMetricsResultPoint struct { + Time uint32 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` + Val float64 `protobuf:"fixed64,2,opt,name=val,proto3" json:"val,omitempty"` + ExemplarTraceID []byte `protobuf:"bytes,3,opt,name=exemplarTraceID,proto3" json:"exemplarTraceID,omitempty"` + ExemplarDuration uint64 `protobuf:"varint,4,opt,name=exemplarDuration,proto3" json:"exemplarDuration,omitempty"` } -type metricsGeneratorClient struct { - cc *grpc.ClientConn +func (m *SpanMetricsResultPoint) Reset() { *m = SpanMetricsResultPoint{} } +func (m *SpanMetricsResultPoint) String() string { return proto.CompactTextString(m) } +func (*SpanMetricsResultPoint) ProtoMessage() {} +func (*SpanMetricsResultPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{37} } - -func NewMetricsGeneratorClient(cc *grpc.ClientConn) MetricsGeneratorClient { - return &metricsGeneratorClient{cc} +func (m *SpanMetricsResultPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpanMetricsResultPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpanMetricsResultPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpanMetricsResultPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanMetricsResultPoint.Merge(m, src) +} +func (m *SpanMetricsResultPoint) XXX_Size() int { + return m.Size() +} +func (m *SpanMetricsResultPoint) XXX_DiscardUnknown() { + xxx_messageInfo_SpanMetricsResultPoint.DiscardUnknown(m) } -func (c *metricsGeneratorClient) PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) { - out := new(PushResponse) - err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/PushSpans", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_SpanMetricsResultPoint proto.InternalMessageInfo + +func (m *SpanMetricsResultPoint) GetTime() uint32 { + if m != nil { + return m.Time } - return out, nil + return 0 } -func (c *metricsGeneratorClient) GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) { - out := new(SpanMetricsResponse) - err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/GetMetrics", in, out, opts...) - if err != nil { - return nil, err +func (m *SpanMetricsResultPoint) GetVal() float64 { + if m != nil { + return m.Val } - return out, nil + return 0 } -// MetricsGeneratorServer is the server API for MetricsGenerator service. -type MetricsGeneratorServer interface { - PushSpans(context.Context, *PushSpansRequest) (*PushResponse, error) - GetMetrics(context.Context, *SpanMetricsRequest) (*SpanMetricsResponse, error) +func (m *SpanMetricsResultPoint) GetExemplarTraceID() []byte { + if m != nil { + return m.ExemplarTraceID + } + return nil } -// UnimplementedMetricsGeneratorServer can be embedded to have forward compatible implementations. -type UnimplementedMetricsGeneratorServer struct { +func (m *SpanMetricsResultPoint) GetExemplarDuration() uint64 { + if m != nil { + return m.ExemplarDuration + } + return 0 } -func (*UnimplementedMetricsGeneratorServer) PushSpans(ctx context.Context, req *PushSpansRequest) (*PushResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushSpans not implemented") -} -func (*UnimplementedMetricsGeneratorServer) GetMetrics(ctx context.Context, req *SpanMetricsRequest) (*SpanMetricsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") +type QueryRangeRequest struct { + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Start uint64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` + End uint64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` + Step uint64 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"` + Shard uint32 `protobuf:"varint,5,opt,name=shard,proto3" json:"shard,omitempty"` + Of uint32 `protobuf:"varint,6,opt,name=of,proto3" json:"of,omitempty"` } -func RegisterMetricsGeneratorServer(s *grpc.Server, srv MetricsGeneratorServer) { - s.RegisterService(&_MetricsGenerator_serviceDesc, srv) +func (m *QueryRangeRequest) Reset() { *m = QueryRangeRequest{} } +func (m *QueryRangeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRangeRequest) ProtoMessage() {} +func (*QueryRangeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{38} } - -func _MetricsGenerator_PushSpans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushSpansRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsGeneratorServer).PushSpans(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.MetricsGenerator/PushSpans", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsGeneratorServer).PushSpans(ctx, req.(*PushSpansRequest)) +func (m *QueryRangeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRangeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryRangeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRangeRequest.Merge(m, src) +} +func (m *QueryRangeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryRangeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRangeRequest.DiscardUnknown(m) } -func _MetricsGenerator_GetMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SpanMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsGeneratorServer).GetMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.MetricsGenerator/GetMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsGeneratorServer).GetMetrics(ctx, req.(*SpanMetricsRequest)) +var xxx_messageInfo_QueryRangeRequest proto.InternalMessageInfo + +func (m *QueryRangeRequest) GetQuery() string { + if m != nil { + return m.Query } - return interceptor(ctx, in, info, handler) + return "" } -var _MetricsGenerator_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.MetricsGenerator", - HandlerType: (*MetricsGeneratorServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PushSpans", - Handler: _MetricsGenerator_PushSpans_Handler, - }, - { - MethodName: "GetMetrics", - Handler: _MetricsGenerator_GetMetrics_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "pkg/tempopb/tempo.proto", +func (m *QueryRangeRequest) GetStart() uint64 { + if m != nil { + return m.Start + } + return 0 } -// QuerierClient is the client API for Querier service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QuerierClient interface { - FindTraceByID(ctx context.Context, in *TraceByIDRequest, opts ...grpc.CallOption) (*TraceByIDResponse, error) - SearchRecent(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) - SearchBlock(ctx context.Context, in *SearchBlockRequest, opts ...grpc.CallOption) (*SearchResponse, error) - SearchTags(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsResponse, error) - SearchTagsV2(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsV2Response, error) - SearchTagValues(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesResponse, error) - SearchTagValuesV2(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesV2Response, error) +func (m *QueryRangeRequest) GetEnd() uint64 { + if m != nil { + return m.End + } + return 0 } -type querierClient struct { - cc *grpc.ClientConn +func (m *QueryRangeRequest) GetStep() uint64 { + if m != nil { + return m.Step + } + return 0 } -func NewQuerierClient(cc *grpc.ClientConn) QuerierClient { - return &querierClient{cc} +func (m *QueryRangeRequest) GetShard() uint32 { + if m != nil { + return m.Shard + } + return 0 } -func (c *querierClient) FindTraceByID(ctx context.Context, in *TraceByIDRequest, opts ...grpc.CallOption) (*TraceByIDResponse, error) { - out := new(TraceByIDResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/FindTraceByID", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryRangeRequest) GetOf() uint32 { + if m != nil { + return m.Of } - return out, nil + return 0 } -func (c *querierClient) SearchRecent(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { - out := new(SearchResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchRecent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QueryRangeResponse struct { + Series []*TimeSeries `protobuf:"bytes,1,rep,name=series,proto3" json:"series,omitempty"` } -func (c *querierClient) SearchBlock(ctx context.Context, in *SearchBlockRequest, opts ...grpc.CallOption) (*SearchResponse, error) { - out := new(SearchResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchBlock", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryRangeResponse) Reset() { *m = QueryRangeResponse{} } +func (m *QueryRangeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRangeResponse) ProtoMessage() {} +func (*QueryRangeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{39} +} +func (m *QueryRangeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRangeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryRangeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRangeResponse.Merge(m, src) +} +func (m *QueryRangeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryRangeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRangeResponse.DiscardUnknown(m) } -func (c *querierClient) SearchTags(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsResponse, error) { - out := new(SearchTagsResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTags", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryRangeResponse proto.InternalMessageInfo + +func (m *QueryRangeResponse) GetSeries() []*TimeSeries { + if m != nil { + return m.Series } - return out, nil + return nil } -func (c *querierClient) SearchTagsV2(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsV2Response, error) { - out := new(SearchTagsV2Response) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagsV2", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type Sample struct { + // Fields order MUST match promql.FPoint so that we can cast types between them. + TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` } -func (c *querierClient) SearchTagValues(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesResponse, error) { - out := new(SearchTagValuesResponse) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagValues", in, out, opts...) - if err != nil { - return nil, err +func (m *Sample) Reset() { *m = Sample{} } +func (m *Sample) String() string { return proto.CompactTextString(m) } +func (*Sample) ProtoMessage() {} +func (*Sample) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{40} +} +func (m *Sample) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Sample.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *Sample) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sample.Merge(m, src) +} +func (m *Sample) XXX_Size() int { + return m.Size() +} +func (m *Sample) XXX_DiscardUnknown() { + xxx_messageInfo_Sample.DiscardUnknown(m) } -func (c *querierClient) SearchTagValuesV2(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesV2Response, error) { - out := new(SearchTagValuesV2Response) - err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagValuesV2", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_Sample proto.InternalMessageInfo + +func (m *Sample) GetTimestampMs() int64 { + if m != nil { + return m.TimestampMs } - return out, nil + return 0 } -// QuerierServer is the server API for Querier service. -type QuerierServer interface { - FindTraceByID(context.Context, *TraceByIDRequest) (*TraceByIDResponse, error) - SearchRecent(context.Context, *SearchRequest) (*SearchResponse, error) - SearchBlock(context.Context, *SearchBlockRequest) (*SearchResponse, error) - SearchTags(context.Context, *SearchTagsRequest) (*SearchTagsResponse, error) - SearchTagsV2(context.Context, *SearchTagsRequest) (*SearchTagsV2Response, error) - SearchTagValues(context.Context, *SearchTagValuesRequest) (*SearchTagValuesResponse, error) - SearchTagValuesV2(context.Context, *SearchTagValuesRequest) (*SearchTagValuesV2Response, error) +func (m *Sample) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 } -// UnimplementedQuerierServer can be embedded to have forward compatible implementations. -type UnimplementedQuerierServer struct { +// https : // github.com/grafana/mimir/blob/main/pkg/mimirpb/mimir.proto#L53 +type TimeSeries struct { + // repeated LabelPair labels = 1 [(gogoproto.nullable) = false, + // (gogoproto.customtype) = "LabelAdapter"]; + Labels []v1.KeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` + // Sorted by time, oldest sample first. + Samples []Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples"` + // repeated Exemplar exemplars = 3 [ (gogoproto.nullable) = false ]; + // repeated Histogram histograms = 4 [ (gogoproto.nullable) = false ]; + // TODO: review the LabelAdapter and migrate the use of this string + PromLabels string `protobuf:"bytes,3,opt,name=prom_labels,json=promLabels,proto3" json:"prom_labels,omitempty"` } -func (*UnimplementedQuerierServer) FindTraceByID(ctx context.Context, req *TraceByIDRequest) (*TraceByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindTraceByID not implemented") -} -func (*UnimplementedQuerierServer) SearchRecent(ctx context.Context, req *SearchRequest) (*SearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchRecent not implemented") +func (m *TimeSeries) Reset() { *m = TimeSeries{} } +func (m *TimeSeries) String() string { return proto.CompactTextString(m) } +func (*TimeSeries) ProtoMessage() {} +func (*TimeSeries) Descriptor() ([]byte, []int) { + return fileDescriptor_f22805646f4f62b6, []int{41} } -func (*UnimplementedQuerierServer) SearchBlock(ctx context.Context, req *SearchBlockRequest) (*SearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchBlock not implemented") +func (m *TimeSeries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQuerierServer) SearchTags(ctx context.Context, req *SearchTagsRequest) (*SearchTagsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchTags not implemented") +func (m *TimeSeries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimeSeries.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (*UnimplementedQuerierServer) SearchTagsV2(ctx context.Context, req *SearchTagsRequest) (*SearchTagsV2Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchTagsV2 not implemented") +func (m *TimeSeries) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimeSeries.Merge(m, src) } -func (*UnimplementedQuerierServer) SearchTagValues(ctx context.Context, req *SearchTagValuesRequest) (*SearchTagValuesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchTagValues not implemented") +func (m *TimeSeries) XXX_Size() int { + return m.Size() } -func (*UnimplementedQuerierServer) SearchTagValuesV2(ctx context.Context, req *SearchTagValuesRequest) (*SearchTagValuesV2Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchTagValuesV2 not implemented") +func (m *TimeSeries) XXX_DiscardUnknown() { + xxx_messageInfo_TimeSeries.DiscardUnknown(m) } -func RegisterQuerierServer(s *grpc.Server, srv QuerierServer) { - s.RegisterService(&_Querier_serviceDesc, srv) -} +var xxx_messageInfo_TimeSeries proto.InternalMessageInfo -func _Querier_FindTraceByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TraceByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QuerierServer).FindTraceByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Querier/FindTraceByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).FindTraceByID(ctx, req.(*TraceByIDRequest)) +func (m *TimeSeries) GetLabels() []v1.KeyValue { + if m != nil { + return m.Labels } - return interceptor(ctx, in, info, handler) + return nil } -func _Querier_SearchRecent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchRequest) - if err := dec(in); err != nil { - return nil, err +func (m *TimeSeries) GetSamples() []Sample { + if m != nil { + return m.Samples } - if interceptor == nil { - return srv.(QuerierServer).SearchRecent(ctx, in) + return nil +} + +func (m *TimeSeries) GetPromLabels() string { + if m != nil { + return m.PromLabels } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.Querier/SearchRecent", + return "" +} + +func init() { + proto.RegisterEnum("tempopb.DedicatedColumn_Scope", DedicatedColumn_Scope_name, DedicatedColumn_Scope_value) + proto.RegisterEnum("tempopb.DedicatedColumn_Type", DedicatedColumn_Type_name, DedicatedColumn_Type_value) + proto.RegisterType((*TraceByIDRequest)(nil), "tempopb.TraceByIDRequest") + proto.RegisterType((*TraceByIDResponse)(nil), "tempopb.TraceByIDResponse") + proto.RegisterType((*TraceByIDMetrics)(nil), "tempopb.TraceByIDMetrics") + proto.RegisterType((*SearchRequest)(nil), "tempopb.SearchRequest") + proto.RegisterMapType((map[string]string)(nil), "tempopb.SearchRequest.TagsEntry") + proto.RegisterType((*SearchBlockRequest)(nil), "tempopb.SearchBlockRequest") + proto.RegisterType((*DedicatedColumn)(nil), "tempopb.DedicatedColumn") + proto.RegisterType((*SearchResponse)(nil), "tempopb.SearchResponse") + proto.RegisterType((*TraceSearchMetadata)(nil), "tempopb.TraceSearchMetadata") + proto.RegisterType((*SpanSet)(nil), "tempopb.SpanSet") + proto.RegisterType((*Span)(nil), "tempopb.Span") + proto.RegisterType((*SearchMetrics)(nil), "tempopb.SearchMetrics") + proto.RegisterType((*SearchTagsRequest)(nil), "tempopb.SearchTagsRequest") + proto.RegisterType((*SearchTagsResponse)(nil), "tempopb.SearchTagsResponse") + proto.RegisterType((*SearchTagsV2Response)(nil), "tempopb.SearchTagsV2Response") + proto.RegisterType((*SearchTagsV2Scope)(nil), "tempopb.SearchTagsV2Scope") + proto.RegisterType((*SearchTagValuesRequest)(nil), "tempopb.SearchTagValuesRequest") + proto.RegisterType((*SearchTagValuesResponse)(nil), "tempopb.SearchTagValuesResponse") + proto.RegisterType((*TagValue)(nil), "tempopb.TagValue") + proto.RegisterType((*SearchTagValuesV2Response)(nil), "tempopb.SearchTagValuesV2Response") + proto.RegisterType((*Trace)(nil), "tempopb.Trace") + proto.RegisterType((*PushResponse)(nil), "tempopb.PushResponse") + proto.RegisterType((*PushBytesRequest)(nil), "tempopb.PushBytesRequest") + proto.RegisterType((*PushSpansRequest)(nil), "tempopb.PushSpansRequest") + proto.RegisterType((*TraceBytes)(nil), "tempopb.TraceBytes") + proto.RegisterType((*LinkSlice)(nil), "tempopb.LinkSlice") + proto.RegisterType((*SpanMetricsRequest)(nil), "tempopb.SpanMetricsRequest") + proto.RegisterType((*SpanMetricsSummaryRequest)(nil), "tempopb.SpanMetricsSummaryRequest") + proto.RegisterType((*SpanMetricsResponse)(nil), "tempopb.SpanMetricsResponse") + proto.RegisterType((*RawHistogram)(nil), "tempopb.RawHistogram") + proto.RegisterType((*KeyValue)(nil), "tempopb.KeyValue") + proto.RegisterType((*RawExemplar)(nil), "tempopb.RawExemplar") + proto.RegisterType((*SpanMetrics)(nil), "tempopb.SpanMetrics") + proto.RegisterType((*SpanMetricsSummary)(nil), "tempopb.SpanMetricsSummary") + proto.RegisterType((*SpanMetricsSummaryResponse)(nil), "tempopb.SpanMetricsSummaryResponse") + proto.RegisterType((*TraceQLStatic)(nil), "tempopb.TraceQLStatic") + proto.RegisterType((*SpanMetricsData)(nil), "tempopb.SpanMetricsData") + proto.RegisterType((*SpanMetricsResult)(nil), "tempopb.SpanMetricsResult") + proto.RegisterType((*SpanMetricsResultPoint)(nil), "tempopb.SpanMetricsResultPoint") + proto.RegisterType((*QueryRangeRequest)(nil), "tempopb.QueryRangeRequest") + proto.RegisterType((*QueryRangeResponse)(nil), "tempopb.QueryRangeResponse") + proto.RegisterType((*Sample)(nil), "tempopb.Sample") + proto.RegisterType((*TimeSeries)(nil), "tempopb.TimeSeries") +} + +func init() { proto.RegisterFile("pkg/tempopb/tempo.proto", fileDescriptor_f22805646f4f62b6) } + +var fileDescriptor_f22805646f4f62b6 = []byte{ + // 2324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcf, 0x6f, 0x1b, 0xc7, + 0xf5, 0xd7, 0xf2, 0x97, 0xc4, 0x47, 0x4a, 0xa6, 0xc6, 0xb6, 0x4c, 0xd3, 0x8e, 0xa4, 0xef, 0xc6, + 0xf8, 0x56, 0x49, 0x1d, 0x49, 0x66, 0x6c, 0xa4, 0x8a, 0x8b, 0x16, 0x96, 0xa5, 0xfa, 0x47, 0x2c, + 0x47, 0x19, 0x2a, 0x2e, 0xd0, 0x8b, 0xb1, 0x5c, 0x8e, 0xe8, 0x85, 0xb8, 0xbb, 0xcc, 0xee, 0x50, + 0x31, 0x7b, 0x2c, 0xd0, 0x02, 0x45, 0x7b, 0xe8, 0xa1, 0x3d, 0xf4, 0xd8, 0x53, 0xd0, 0x73, 0xff, + 0x84, 0x02, 0x45, 0x2e, 0x2d, 0x72, 0x2c, 0x7a, 0x08, 0x0a, 0xfb, 0xd0, 0x73, 0xff, 0x83, 0xe2, + 0xbd, 0x99, 0xd9, 0x1f, 0x24, 0x25, 0x23, 0x6d, 0x81, 0x9e, 0x38, 0xef, 0x33, 0x9f, 0x79, 0xf3, + 0xe6, 0xcd, 0x9b, 0x37, 0x6f, 0x96, 0x70, 0x65, 0x78, 0xd2, 0xdf, 0x92, 0xc2, 0x1f, 0x86, 0xc3, + 0xae, 0xfa, 0xdd, 0x1c, 0x46, 0xa1, 0x0c, 0xd9, 0xbc, 0x06, 0x5b, 0x2b, 0x6e, 0xe8, 0xfb, 0x61, + 0xb0, 0x75, 0x7a, 0x6b, 0x4b, 0xb5, 0x14, 0xa1, 0xf5, 0x5e, 0xdf, 0x93, 0x2f, 0x46, 0xdd, 0x4d, + 0x37, 0xf4, 0xb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, + 0x11, 0xb8, 0x61, 0xcf, 0x0b, 0xfa, 0x3a, 0x38, 0x13, 0x19, 0x35, 0x78, 0x41, 0x4f, 0xbc, 0x44, + 0x75, 0x1d, 0xef, 0xc7, 0x42, 0xfb, 0x36, 0x0f, 0x32, 0x1b, 0xea, 0x32, 0x94, 0xce, 0x80, 0x0b, + 0x37, 0x8c, 0x7a, 0x71, 0x73, 0x9e, 0x48, 0x39, 0x0c, 0x39, 0x3d, 0x47, 0x3a, 0xfb, 0x66, 0x26, + 0xb5, 0x21, 0x39, 0x0c, 0xd7, 0x79, 0x2a, 0xa2, 0xd8, 0x0b, 0x03, 0xda, 0x8f, 0x2a, 0x37, 0x22, + 0x63, 0x50, 0x8a, 0x71, 0x7a, 0x58, 0xb7, 0x36, 0x4a, 0x9c, 0xda, 0x78, 0x22, 0x8f, 0xc3, 0x50, + 0x8a, 0x88, 0x0c, 0xab, 0xd1, 0x9c, 0x19, 0x84, 0xed, 0x41, 0xa3, 0x27, 0x7a, 0x9e, 0xeb, 0x48, + 0xd1, 0xbb, 0x1f, 0x0e, 0x46, 0x7e, 0x10, 0x37, 0xeb, 0x14, 0xcd, 0xcd, 0xc4, 0xe5, 0x7b, 0x79, + 0x02, 0x9f, 0x1a, 0x61, 0xff, 0xd1, 0x82, 0x0b, 0x13, 0x2c, 0x76, 0x1b, 0xca, 0xb1, 0x1b, 0x0e, + 0x95, 0xc7, 0x97, 0xda, 0xab, 0x67, 0xa9, 0xdb, 0xec, 0x20, 0x8b, 0x2b, 0x32, 0xae, 0x21, 0x70, + 0x7c, 0x13, 0x2b, 0xd4, 0x66, 0xb7, 0xa0, 0x24, 0xc7, 0x43, 0x75, 0xca, 0x97, 0xda, 0x6f, 0x9d, + 0xa9, 0xe8, 0x68, 0x3c, 0x14, 0x9c, 0xa8, 0xf6, 0x1a, 0x94, 0x49, 0x2d, 0x5b, 0x80, 0x52, 0xe7, + 0xf0, 0xde, 0xd3, 0xc6, 0x1c, 0xab, 0xc3, 0x02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c, 0x2a, 0x4f, 0x64, 0xfb, 0x31, 0x5c, 0x4a, 0x47, 0x3c, + 0x6b, 0x27, 0x63, 0xda, 0x50, 0x21, 0x95, 0x26, 0x56, 0x5b, 0x13, 0x19, 0x41, 0xd1, 0x55, 0x26, + 0xd4, 0x4c, 0xfb, 0x6e, 0xd6, 0x50, 0xdd, 0x99, 0x84, 0x95, 0x95, 0x09, 0x2b, 0x06, 0x25, 0x89, + 0x55, 0x48, 0x81, 0x8c, 0xa1, 0xb6, 0xfd, 0x10, 0x56, 0x92, 0xc1, 0xb4, 0xef, 0x71, 0xb6, 0x7a, + 0x53, 0xe6, 0x26, 0x39, 0x45, 0x89, 0xe8, 0x04, 0x2a, 0xb8, 0xcc, 0x45, 0x4d, 0x82, 0xfd, 0x01, + 0x5c, 0x99, 0xd2, 0xa4, 0x57, 0x85, 0x5b, 0x62, 0x40, 0xed, 0x8a, 0x14, 0xb0, 0x6f, 0xc3, 0x82, + 0x19, 0x42, 0x26, 0x8e, 0x13, 0xf7, 0x52, 0x7b, 0x76, 0x5d, 0x60, 0x3f, 0x81, 0xab, 0x13, 0xd3, + 0x65, 0xdc, 0xb8, 0x35, 0x39, 0x61, 0xad, 0xbd, 0x9c, 0xa6, 0x64, 0xdd, 0x93, 0xb5, 0x61, 0x17, + 0xca, 0x14, 0xae, 0x6c, 0x07, 0xe6, 0xbb, 0x74, 0xee, 0xcd, 0xb8, 0xb5, 0x64, 0x9c, 0xaa, 0x77, + 0x4f, 0x6f, 0x6d, 0x72, 0x11, 0x87, 0xa3, 0xc8, 0x15, 0x54, 0xdf, 0x70, 0xc3, 0xb7, 0x97, 0xa0, + 0x7e, 0x38, 0x8a, 0x93, 0x4b, 0xc1, 0xfe, 0x9d, 0x05, 0x0d, 0x04, 0x28, 0x9c, 0x8c, 0x57, 0xdf, + 0x4b, 0x6e, 0x0a, 0xdc, 0x85, 0xfa, 0xee, 0x65, 0xac, 0xf4, 0xfe, 0xf6, 0xf5, 0xda, 0xe2, 0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x59, 0x0f, + 0xb1, 0x69, 0x47, 0x4d, 0xbf, 0x02, 0xed, 0x39, 0xf6, 0x91, 0x59, 0x92, 0x7a, 0x9f, 0x9d, 0xab, + 0xea, 0xad, 0x99, 0xef, 0xbd, 0x8c, 0xb2, 0x67, 0x70, 0x61, 0xe2, 0xd9, 0xc3, 0xd6, 0xa6, 0xc7, + 0xe4, 0x5e, 0x72, 0xad, 0xf5, 0xb3, 0x09, 0x89, 0xde, 0x1f, 0x65, 0x1e, 0x91, 0xe6, 0x39, 0xf5, + 0x66, 0xcd, 0xf6, 0x59, 0x84, 0xac, 0xcd, 0xed, 0x8f, 0xa1, 0xd1, 0x91, 0x91, 0x70, 0x7c, 0x2f, + 0xe8, 0x9b, 0x88, 0xb9, 0x0b, 0x15, 0xfd, 0xc5, 0xf4, 0x9b, 0xee, 0xf0, 0xb6, 0xd5, 0xfe, 0x83, + 0x05, 0xf3, 0xe6, 0x30, 0x3c, 0x9f, 0x59, 0xf2, 0xd8, 0xe7, 0x15, 0x02, 0x7a, 0x82, 0xb7, 0xcf, + 0xe5, 0xfc, 0xd7, 0x0f, 0xcc, 0x6e, 0xf3, 0xcb, 0x57, 0xab, 0xd6, 0x57, 0xaf, 0x56, 0xad, 0xbf, + 0xbf, 0x5a, 0xb5, 0x7e, 0xf5, 0x7a, 0x75, 0xee, 0xab, 0xd7, 0xab, 0x73, 0x7f, 0x7d, 0xbd, 0x3a, + 0xd7, 0xad, 0xd0, 0x9f, 0x28, 0xef, 0xff, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xeb, 0xb1, 0xa5, + 0xc5, 0x19, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// PusherClient is the client API for Pusher service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PusherClient interface { + // different versions of PushBytes expect the trace data to be pushed in + // different formats + PushBytes(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) + PushBytesV2(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) +} + +type pusherClient struct { + cc *grpc.ClientConn +} + +func NewPusherClient(cc *grpc.ClientConn) PusherClient { + return &pusherClient{cc} +} + +func (c *pusherClient) PushBytes(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) { + out := new(PushResponse) + err := c.cc.Invoke(ctx, "/tempopb.Pusher/PushBytes", in, out, opts...) + if err != nil { + return nil, err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchRecent(ctx, req.(*SearchRequest)) + return out, nil +} + +func (c *pusherClient) PushBytesV2(ctx context.Context, in *PushBytesRequest, opts ...grpc.CallOption) (*PushResponse, error) { + out := new(PushResponse) + err := c.cc.Invoke(ctx, "/tempopb.Pusher/PushBytesV2", in, out, opts...) + if err != nil { + return nil, err } - return interceptor(ctx, in, info, handler) + return out, nil } -func _Querier_SearchBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchBlockRequest) +// PusherServer is the server API for Pusher service. +type PusherServer interface { + // different versions of PushBytes expect the trace data to be pushed in + // different formats + PushBytes(context.Context, *PushBytesRequest) (*PushResponse, error) + PushBytesV2(context.Context, *PushBytesRequest) (*PushResponse, error) +} + +// UnimplementedPusherServer can be embedded to have forward compatible implementations. +type UnimplementedPusherServer struct { +} + +func (*UnimplementedPusherServer) PushBytes(ctx context.Context, req *PushBytesRequest) (*PushResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushBytes not implemented") +} +func (*UnimplementedPusherServer) PushBytesV2(ctx context.Context, req *PushBytesRequest) (*PushResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushBytesV2 not implemented") +} + +func RegisterPusherServer(s *grpc.Server, srv PusherServer) { + s.RegisterService(&_Pusher_serviceDesc, srv) +} + +func _Pusher_PushBytes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushBytesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QuerierServer).SearchBlock(ctx, in) + return srv.(PusherServer).PushBytes(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Querier/SearchBlock", + FullMethod: "/tempopb.Pusher/PushBytes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchBlock(ctx, req.(*SearchBlockRequest)) + return srv.(PusherServer).PushBytes(ctx, req.(*PushBytesRequest)) } return interceptor(ctx, in, info, handler) } -func _Querier_SearchTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchTagsRequest) +func _Pusher_PushBytesV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushBytesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QuerierServer).SearchTags(ctx, in) + return srv.(PusherServer).PushBytesV2(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Querier/SearchTags", + FullMethod: "/tempopb.Pusher/PushBytesV2", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchTags(ctx, req.(*SearchTagsRequest)) + return srv.(PusherServer).PushBytesV2(ctx, req.(*PushBytesRequest)) } return interceptor(ctx, in, info, handler) } -func _Querier_SearchTagsV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchTagsRequest) +var _Pusher_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.Pusher", + HandlerType: (*PusherServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PushBytes", + Handler: _Pusher_PushBytes_Handler, + }, + { + MethodName: "PushBytesV2", + Handler: _Pusher_PushBytesV2_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pkg/tempopb/tempo.proto", +} + +// MetricsGeneratorClient is the client API for MetricsGenerator service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MetricsGeneratorClient interface { + PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) + GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) + QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryRangeResponse, error) +} + +type metricsGeneratorClient struct { + cc *grpc.ClientConn +} + +func NewMetricsGeneratorClient(cc *grpc.ClientConn) MetricsGeneratorClient { + return &metricsGeneratorClient{cc} +} + +func (c *metricsGeneratorClient) PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) { + out := new(PushResponse) + err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/PushSpans", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricsGeneratorClient) GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) { + out := new(SpanMetricsResponse) + err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/GetMetrics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricsGeneratorClient) QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryRangeResponse, error) { + out := new(QueryRangeResponse) + err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/QueryRange", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MetricsGeneratorServer is the server API for MetricsGenerator service. +type MetricsGeneratorServer interface { + PushSpans(context.Context, *PushSpansRequest) (*PushResponse, error) + GetMetrics(context.Context, *SpanMetricsRequest) (*SpanMetricsResponse, error) + QueryRange(context.Context, *QueryRangeRequest) (*QueryRangeResponse, error) +} + +// UnimplementedMetricsGeneratorServer can be embedded to have forward compatible implementations. +type UnimplementedMetricsGeneratorServer struct { +} + +func (*UnimplementedMetricsGeneratorServer) PushSpans(ctx context.Context, req *PushSpansRequest) (*PushResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushSpans not implemented") +} +func (*UnimplementedMetricsGeneratorServer) GetMetrics(ctx context.Context, req *SpanMetricsRequest) (*SpanMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") +} +func (*UnimplementedMetricsGeneratorServer) QueryRange(ctx context.Context, req *QueryRangeRequest) (*QueryRangeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryRange not implemented") +} + +func RegisterMetricsGeneratorServer(s *grpc.Server, srv MetricsGeneratorServer) { + s.RegisterService(&_MetricsGenerator_serviceDesc, srv) +} + +func _MetricsGenerator_PushSpans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushSpansRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QuerierServer).SearchTagsV2(ctx, in) + return srv.(MetricsGeneratorServer).PushSpans(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Querier/SearchTagsV2", + FullMethod: "/tempopb.MetricsGenerator/PushSpans", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchTagsV2(ctx, req.(*SearchTagsRequest)) + return srv.(MetricsGeneratorServer).PushSpans(ctx, req.(*PushSpansRequest)) } return interceptor(ctx, in, info, handler) } -func _Querier_SearchTagValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchTagValuesRequest) +func _MetricsGenerator_GetMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SpanMetricsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QuerierServer).SearchTagValues(ctx, in) + return srv.(MetricsGeneratorServer).GetMetrics(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Querier/SearchTagValues", + FullMethod: "/tempopb.MetricsGenerator/GetMetrics", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchTagValues(ctx, req.(*SearchTagValuesRequest)) + return srv.(MetricsGeneratorServer).GetMetrics(ctx, req.(*SpanMetricsRequest)) } return interceptor(ctx, in, info, handler) } -func _Querier_SearchTagValuesV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchTagValuesRequest) +func _MetricsGenerator_QueryRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRangeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QuerierServer).SearchTagValuesV2(ctx, in) + return srv.(MetricsGeneratorServer).QueryRange(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Querier/SearchTagValuesV2", + FullMethod: "/tempopb.MetricsGenerator/QueryRange", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QuerierServer).SearchTagValuesV2(ctx, req.(*SearchTagValuesRequest)) + return srv.(MetricsGeneratorServer).QueryRange(ctx, req.(*QueryRangeRequest)) } return interceptor(ctx, in, info, handler) } -var _Querier_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.Querier", - HandlerType: (*QuerierServer)(nil), +var _MetricsGenerator_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.MetricsGenerator", + HandlerType: (*MetricsGeneratorServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "FindTraceByID", - Handler: _Querier_FindTraceByID_Handler, - }, - { - MethodName: "SearchRecent", - Handler: _Querier_SearchRecent_Handler, - }, - { - MethodName: "SearchBlock", - Handler: _Querier_SearchBlock_Handler, - }, - { - MethodName: "SearchTags", - Handler: _Querier_SearchTags_Handler, - }, - { - MethodName: "SearchTagsV2", - Handler: _Querier_SearchTagsV2_Handler, + MethodName: "PushSpans", + Handler: _MetricsGenerator_PushSpans_Handler, }, { - MethodName: "SearchTagValues", - Handler: _Querier_SearchTagValues_Handler, + MethodName: "GetMetrics", + Handler: _MetricsGenerator_GetMetrics_Handler, }, { - MethodName: "SearchTagValuesV2", - Handler: _Querier_SearchTagValuesV2_Handler, + MethodName: "QueryRange", + Handler: _MetricsGenerator_QueryRange_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/tempopb/tempo.proto", } -// StreamingQuerierClient is the client API for StreamingQuerier service. +// QuerierClient is the client API for Querier service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type StreamingQuerierClient interface { - Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (StreamingQuerier_SearchClient, error) +type QuerierClient interface { + FindTraceByID(ctx context.Context, in *TraceByIDRequest, opts ...grpc.CallOption) (*TraceByIDResponse, error) + SearchRecent(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) + SearchBlock(ctx context.Context, in *SearchBlockRequest, opts ...grpc.CallOption) (*SearchResponse, error) + SearchTags(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsResponse, error) + SearchTagsV2(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsV2Response, error) + SearchTagValues(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesResponse, error) + SearchTagValuesV2(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesV2Response, error) } -type streamingQuerierClient struct { +type querierClient struct { cc *grpc.ClientConn } -func NewStreamingQuerierClient(cc *grpc.ClientConn) StreamingQuerierClient { - return &streamingQuerierClient{cc} +func NewQuerierClient(cc *grpc.ClientConn) QuerierClient { + return &querierClient{cc} } -func (c *streamingQuerierClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (StreamingQuerier_SearchClient, error) { - stream, err := c.cc.NewStream(ctx, &_StreamingQuerier_serviceDesc.Streams[0], "/tempopb.StreamingQuerier/Search", opts...) +func (c *querierClient) FindTraceByID(ctx context.Context, in *TraceByIDRequest, opts ...grpc.CallOption) (*TraceByIDResponse, error) { + out := new(TraceByIDResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/FindTraceByID", in, out, opts...) if err != nil { return nil, err } - x := &streamingQuerierSearchClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { + return out, nil +} + +func (c *querierClient) SearchRecent(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { + out := new(SearchResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchRecent", in, out, opts...) + if err != nil { return nil, err } - return x, nil + return out, nil } -type StreamingQuerier_SearchClient interface { - Recv() (*SearchResponse, error) - grpc.ClientStream +func (c *querierClient) SearchBlock(ctx context.Context, in *SearchBlockRequest, opts ...grpc.CallOption) (*SearchResponse, error) { + out := new(SearchResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -type streamingQuerierSearchClient struct { - grpc.ClientStream +func (c *querierClient) SearchTags(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsResponse, error) { + out := new(SearchTagsResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTags", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (x *streamingQuerierSearchClient) Recv() (*SearchResponse, error) { - m := new(SearchResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { +func (c *querierClient) SearchTagsV2(ctx context.Context, in *SearchTagsRequest, opts ...grpc.CallOption) (*SearchTagsV2Response, error) { + out := new(SearchTagsV2Response) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagsV2", in, out, opts...) + if err != nil { return nil, err } - return m, nil + return out, nil } -// StreamingQuerierServer is the server API for StreamingQuerier service. -type StreamingQuerierServer interface { - Search(*SearchRequest, StreamingQuerier_SearchServer) error +func (c *querierClient) SearchTagValues(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesResponse, error) { + out := new(SearchTagValuesResponse) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagValues", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -// UnimplementedStreamingQuerierServer can be embedded to have forward compatible implementations. -type UnimplementedStreamingQuerierServer struct { +func (c *querierClient) SearchTagValuesV2(ctx context.Context, in *SearchTagValuesRequest, opts ...grpc.CallOption) (*SearchTagValuesV2Response, error) { + out := new(SearchTagValuesV2Response) + err := c.cc.Invoke(ctx, "/tempopb.Querier/SearchTagValuesV2", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (*UnimplementedStreamingQuerierServer) Search(req *SearchRequest, srv StreamingQuerier_SearchServer) error { - return status.Errorf(codes.Unimplemented, "method Search not implemented") +// QuerierServer is the server API for Querier service. +type QuerierServer interface { + FindTraceByID(context.Context, *TraceByIDRequest) (*TraceByIDResponse, error) + SearchRecent(context.Context, *SearchRequest) (*SearchResponse, error) + SearchBlock(context.Context, *SearchBlockRequest) (*SearchResponse, error) + SearchTags(context.Context, *SearchTagsRequest) (*SearchTagsResponse, error) + SearchTagsV2(context.Context, *SearchTagsRequest) (*SearchTagsV2Response, error) + SearchTagValues(context.Context, *SearchTagValuesRequest) (*SearchTagValuesResponse, error) + SearchTagValuesV2(context.Context, *SearchTagValuesRequest) (*SearchTagValuesV2Response, error) } -func RegisterStreamingQuerierServer(s *grpc.Server, srv StreamingQuerierServer) { - s.RegisterService(&_StreamingQuerier_serviceDesc, srv) +// UnimplementedQuerierServer can be embedded to have forward compatible implementations. +type UnimplementedQuerierServer struct { } -func _StreamingQuerier_Search_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SearchRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(StreamingQuerierServer).Search(m, &streamingQuerierSearchServer{stream}) +func (*UnimplementedQuerierServer) FindTraceByID(ctx context.Context, req *TraceByIDRequest) (*TraceByIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindTraceByID not implemented") } - -type StreamingQuerier_SearchServer interface { - Send(*SearchResponse) error - grpc.ServerStream +func (*UnimplementedQuerierServer) SearchRecent(ctx context.Context, req *SearchRequest) (*SearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchRecent not implemented") } - -type streamingQuerierSearchServer struct { - grpc.ServerStream +func (*UnimplementedQuerierServer) SearchBlock(ctx context.Context, req *SearchBlockRequest) (*SearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchBlock not implemented") } - -func (x *streamingQuerierSearchServer) Send(m *SearchResponse) error { - return x.ServerStream.SendMsg(m) +func (*UnimplementedQuerierServer) SearchTags(ctx context.Context, req *SearchTagsRequest) (*SearchTagsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchTags not implemented") } - -var _StreamingQuerier_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.StreamingQuerier", - HandlerType: (*StreamingQuerierServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Search", - Handler: _StreamingQuerier_Search_Handler, - ServerStreams: true, - }, - }, - Metadata: "pkg/tempopb/tempo.proto", +func (*UnimplementedQuerierServer) SearchTagsV2(ctx context.Context, req *SearchTagsRequest) (*SearchTagsV2Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchTagsV2 not implemented") } - -// MetricsClient is the client API for Metrics service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetricsClient interface { - SpanMetricsSummary(ctx context.Context, in *SpanMetricsSummaryRequest, opts ...grpc.CallOption) (*SpanMetricsSummaryResponse, error) +func (*UnimplementedQuerierServer) SearchTagValues(ctx context.Context, req *SearchTagValuesRequest) (*SearchTagValuesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchTagValues not implemented") } - -type metricsClient struct { - cc *grpc.ClientConn +func (*UnimplementedQuerierServer) SearchTagValuesV2(ctx context.Context, req *SearchTagValuesRequest) (*SearchTagValuesV2Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchTagValuesV2 not implemented") } -func NewMetricsClient(cc *grpc.ClientConn) MetricsClient { - return &metricsClient{cc} +func RegisterQuerierServer(s *grpc.Server, srv QuerierServer) { + s.RegisterService(&_Querier_serviceDesc, srv) } -func (c *metricsClient) SpanMetricsSummary(ctx context.Context, in *SpanMetricsSummaryRequest, opts ...grpc.CallOption) (*SpanMetricsSummaryResponse, error) { - out := new(SpanMetricsSummaryResponse) - err := c.cc.Invoke(ctx, "/tempopb.Metrics/SpanMetricsSummary", in, out, opts...) - if err != nil { +func _Querier_FindTraceByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TraceByIDRequest) + if err := dec(in); err != nil { return nil, err } - return out, nil -} - -// MetricsServer is the server API for Metrics service. -type MetricsServer interface { - SpanMetricsSummary(context.Context, *SpanMetricsSummaryRequest) (*SpanMetricsSummaryResponse, error) -} - -// UnimplementedMetricsServer can be embedded to have forward compatible implementations. -type UnimplementedMetricsServer struct { + if interceptor == nil { + return srv.(QuerierServer).FindTraceByID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/FindTraceByID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).FindTraceByID(ctx, req.(*TraceByIDRequest)) + } + return interceptor(ctx, in, info, handler) } -func (*UnimplementedMetricsServer) SpanMetricsSummary(ctx context.Context, req *SpanMetricsSummaryRequest) (*SpanMetricsSummaryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SpanMetricsSummary not implemented") +func _Querier_SearchRecent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuerierServer).SearchRecent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchRecent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchRecent(ctx, req.(*SearchRequest)) + } + return interceptor(ctx, in, info, handler) } -func RegisterMetricsServer(s *grpc.Server, srv MetricsServer) { - s.RegisterService(&_Metrics_serviceDesc, srv) +func _Querier_SearchBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuerierServer).SearchBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchBlock(ctx, req.(*SearchBlockRequest)) + } + return interceptor(ctx, in, info, handler) } -func _Metrics_SpanMetricsSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SpanMetricsSummaryRequest) +func _Querier_SearchTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchTagsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MetricsServer).SpanMetricsSummary(ctx, in) + return srv.(QuerierServer).SearchTags(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tempopb.Metrics/SpanMetricsSummary", + FullMethod: "/tempopb.Querier/SearchTags", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServer).SpanMetricsSummary(ctx, req.(*SpanMetricsSummaryRequest)) + return srv.(QuerierServer).SearchTags(ctx, req.(*SearchTagsRequest)) } return interceptor(ctx, in, info, handler) } -var _Metrics_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tempopb.Metrics", - HandlerType: (*MetricsServer)(nil), - Methods: []grpc.MethodDesc{ +func _Querier_SearchTagsV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchTagsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuerierServer).SearchTagsV2(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchTagsV2", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchTagsV2(ctx, req.(*SearchTagsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Querier_SearchTagValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchTagValuesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuerierServer).SearchTagValues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchTagValues", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchTagValues(ctx, req.(*SearchTagValuesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Querier_SearchTagValuesV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchTagValuesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuerierServer).SearchTagValuesV2(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Querier/SearchTagValuesV2", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).SearchTagValuesV2(ctx, req.(*SearchTagValuesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Querier_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.Querier", + HandlerType: (*QuerierServer)(nil), + Methods: []grpc.MethodDesc{ { - MethodName: "SpanMetricsSummary", - Handler: _Metrics_SpanMetricsSummary_Handler, + MethodName: "FindTraceByID", + Handler: _Querier_FindTraceByID_Handler, + }, + { + MethodName: "SearchRecent", + Handler: _Querier_SearchRecent_Handler, + }, + { + MethodName: "SearchBlock", + Handler: _Querier_SearchBlock_Handler, + }, + { + MethodName: "SearchTags", + Handler: _Querier_SearchTags_Handler, + }, + { + MethodName: "SearchTagsV2", + Handler: _Querier_SearchTagsV2_Handler, + }, + { + MethodName: "SearchTagValues", + Handler: _Querier_SearchTagValues_Handler, + }, + { + MethodName: "SearchTagValuesV2", + Handler: _Querier_SearchTagValuesV2_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/tempopb/tempo.proto", } -func (m *TraceByIDRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +// StreamingQuerierClient is the client API for StreamingQuerier service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type StreamingQuerierClient interface { + Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (StreamingQuerier_SearchClient, error) } -func (m *TraceByIDRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type streamingQuerierClient struct { + cc *grpc.ClientConn } -func (m *TraceByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.QueryMode) > 0 { - i -= len(m.QueryMode) - copy(dAtA[i:], m.QueryMode) - i = encodeVarintTempo(dAtA, i, uint64(len(m.QueryMode))) - i-- - dAtA[i] = 0x2a - } - if len(m.BlockEnd) > 0 { - i -= len(m.BlockEnd) - copy(dAtA[i:], m.BlockEnd) - i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockEnd))) - i-- - dAtA[i] = 0x1a - } - if len(m.BlockStart) > 0 { - i -= len(m.BlockStart) - copy(dAtA[i:], m.BlockStart) - i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockStart))) - i-- - dAtA[i] = 0x12 - } - if len(m.TraceID) > 0 { - i -= len(m.TraceID) - copy(dAtA[i:], m.TraceID) - i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +func NewStreamingQuerierClient(cc *grpc.ClientConn) StreamingQuerierClient { + return &streamingQuerierClient{cc} } -func (m *TraceByIDResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *streamingQuerierClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (StreamingQuerier_SearchClient, error) { + stream, err := c.cc.NewStream(ctx, &_StreamingQuerier_serviceDesc.Streams[0], "/tempopb.StreamingQuerier/Search", opts...) if err != nil { return nil, err } - return dAtA[:n], nil + x := &streamingQuerierSearchClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil } -func (m *TraceByIDResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type StreamingQuerier_SearchClient interface { + Recv() (*SearchResponse, error) + grpc.ClientStream } -func (m *TraceByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metrics != nil { - { - size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Trace != nil { - { - size, err := m.Trace.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type streamingQuerierSearchClient struct { + grpc.ClientStream } -func (m *TraceByIDMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func (x *streamingQuerierSearchClient) Recv() (*SearchResponse, error) { + m := new(SearchResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } - return dAtA[:n], nil + return m, nil } -func (m *TraceByIDMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// StreamingQuerierServer is the server API for StreamingQuerier service. +type StreamingQuerierServer interface { + Search(*SearchRequest, StreamingQuerier_SearchServer) error } -func (m *TraceByIDMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +// UnimplementedStreamingQuerierServer can be embedded to have forward compatible implementations. +type UnimplementedStreamingQuerierServer struct { } -func (m *SearchRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (*UnimplementedStreamingQuerierServer) Search(req *SearchRequest, srv StreamingQuerier_SearchServer) error { + return status.Errorf(codes.Unimplemented, "method Search not implemented") } -func (m *SearchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func RegisterStreamingQuerierServer(s *grpc.Server, srv StreamingQuerierServer) { + s.RegisterService(&_StreamingQuerier_serviceDesc, srv) } -func (m *SearchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SpansPerSpanSet != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.SpansPerSpanSet)) - i-- - dAtA[i] = 0x48 - } - if len(m.Query) > 0 { - i -= len(m.Query) - copy(dAtA[i:], m.Query) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) - i-- - dAtA[i] = 0x42 +func _StreamingQuerier_Search_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SearchRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - if m.End != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.End)) - i-- - dAtA[i] = 0x30 + return srv.(StreamingQuerierServer).Search(m, &streamingQuerierSearchServer{stream}) +} + +type StreamingQuerier_SearchServer interface { + Send(*SearchResponse) error + grpc.ServerStream +} + +type streamingQuerierSearchServer struct { + grpc.ServerStream +} + +func (x *streamingQuerierSearchServer) Send(m *SearchResponse) error { + return x.ServerStream.SendMsg(m) +} + +var _StreamingQuerier_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.StreamingQuerier", + HandlerType: (*StreamingQuerierServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Search", + Handler: _StreamingQuerier_Search_Handler, + ServerStreams: true, + }, + }, + Metadata: "pkg/tempopb/tempo.proto", +} + +// MetricsClient is the client API for Metrics service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MetricsClient interface { + SpanMetricsSummary(ctx context.Context, in *SpanMetricsSummaryRequest, opts ...grpc.CallOption) (*SpanMetricsSummaryResponse, error) + QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryRangeResponse, error) +} + +type metricsClient struct { + cc *grpc.ClientConn +} + +func NewMetricsClient(cc *grpc.ClientConn) MetricsClient { + return &metricsClient{cc} +} + +func (c *metricsClient) SpanMetricsSummary(ctx context.Context, in *SpanMetricsSummaryRequest, opts ...grpc.CallOption) (*SpanMetricsSummaryResponse, error) { + out := new(SpanMetricsSummaryResponse) + err := c.cc.Invoke(ctx, "/tempopb.Metrics/SpanMetricsSummary", in, out, opts...) + if err != nil { + return nil, err } - if m.Start != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Start)) - i-- - dAtA[i] = 0x28 + return out, nil +} + +func (c *metricsClient) QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryRangeResponse, error) { + out := new(QueryRangeResponse) + err := c.cc.Invoke(ctx, "/tempopb.Metrics/QueryRange", in, out, opts...) + if err != nil { + return nil, err } - if m.Limit != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x20 + return out, nil +} + +// MetricsServer is the server API for Metrics service. +type MetricsServer interface { + SpanMetricsSummary(context.Context, *SpanMetricsSummaryRequest) (*SpanMetricsSummaryResponse, error) + QueryRange(context.Context, *QueryRangeRequest) (*QueryRangeResponse, error) +} + +// UnimplementedMetricsServer can be embedded to have forward compatible implementations. +type UnimplementedMetricsServer struct { +} + +func (*UnimplementedMetricsServer) SpanMetricsSummary(ctx context.Context, req *SpanMetricsSummaryRequest) (*SpanMetricsSummaryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SpanMetricsSummary not implemented") +} +func (*UnimplementedMetricsServer) QueryRange(ctx context.Context, req *QueryRangeRequest) (*QueryRangeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryRange not implemented") +} + +func RegisterMetricsServer(s *grpc.Server, srv MetricsServer) { + s.RegisterService(&_Metrics_serviceDesc, srv) +} + +func _Metrics_SpanMetricsSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SpanMetricsSummaryRequest) + if err := dec(in); err != nil { + return nil, err } - if m.MaxDurationMs != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.MaxDurationMs)) - i-- - dAtA[i] = 0x18 + if interceptor == nil { + return srv.(MetricsServer).SpanMetricsSummary(ctx, in) } - if m.MinDurationMs != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.MinDurationMs)) - i-- - dAtA[i] = 0x10 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Metrics/SpanMetricsSummary", } - if len(m.Tags) > 0 { - for k := range m.Tags { - v := m.Tags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTempo(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTempo(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTempo(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServer).SpanMetricsSummary(ctx, req.(*SpanMetricsSummaryRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *SearchBlockRequest) Marshal() (dAtA []byte, err error) { +func _Metrics_QueryRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsServer).QueryRange(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tempopb.Metrics/QueryRange", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsServer).QueryRange(ctx, req.(*QueryRangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Metrics_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tempopb.Metrics", + HandlerType: (*MetricsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SpanMetricsSummary", + Handler: _Metrics_SpanMetricsSummary_Handler, + }, + { + MethodName: "QueryRange", + Handler: _Metrics_QueryRange_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pkg/tempopb/tempo.proto", +} + +func (m *TraceByIDRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3220,104 +3605,48 @@ func (m *SearchBlockRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchBlockRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *TraceByIDRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TraceByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.DedicatedColumns) > 0 { - for iNdEx := len(m.DedicatedColumns) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DedicatedColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - } - if m.FooterSize != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.FooterSize)) - i-- - dAtA[i] = 0x58 - } - if m.Size_ != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Size_)) - i-- - dAtA[i] = 0x50 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x4a - } - if len(m.DataEncoding) > 0 { - i -= len(m.DataEncoding) - copy(dAtA[i:], m.DataEncoding) - i = encodeVarintTempo(dAtA, i, uint64(len(m.DataEncoding))) - i-- - dAtA[i] = 0x42 - } - if m.TotalRecords != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.TotalRecords)) - i-- - dAtA[i] = 0x38 - } - if m.IndexPageSize != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.IndexPageSize)) - i-- - dAtA[i] = 0x30 - } - if len(m.Encoding) > 0 { - i -= len(m.Encoding) - copy(dAtA[i:], m.Encoding) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Encoding))) + if len(m.QueryMode) > 0 { + i -= len(m.QueryMode) + copy(dAtA[i:], m.QueryMode) + i = encodeVarintTempo(dAtA, i, uint64(len(m.QueryMode))) i-- dAtA[i] = 0x2a } - if m.PagesToSearch != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.PagesToSearch)) - i-- - dAtA[i] = 0x20 - } - if m.StartPage != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.StartPage)) + if len(m.BlockEnd) > 0 { + i -= len(m.BlockEnd) + copy(dAtA[i:], m.BlockEnd) + i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockEnd))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } - if len(m.BlockID) > 0 { - i -= len(m.BlockID) - copy(dAtA[i:], m.BlockID) - i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockID))) + if len(m.BlockStart) > 0 { + i -= len(m.BlockStart) + copy(dAtA[i:], m.BlockStart) + i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockStart))) i-- dAtA[i] = 0x12 } - if m.SearchReq != nil { - { - size, err := m.SearchReq.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } + if len(m.TraceID) > 0 { + i -= len(m.TraceID) + copy(dAtA[i:], m.TraceID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *DedicatedColumn) Marshal() (dAtA []byte, err error) { +func (m *TraceByIDResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3327,37 +3656,44 @@ func (m *DedicatedColumn) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DedicatedColumn) MarshalTo(dAtA []byte) (int, error) { +func (m *TraceByIDResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DedicatedColumn) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TraceByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Scope != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Scope)) - i-- - dAtA[i] = 0x18 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTempo(dAtA, i, uint64(len(m.Name))) + if m.Metrics != nil { + { + size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } - if m.Type != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Type)) + if m.Trace != nil { + { + size, err := m.Trace.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SearchResponse) Marshal() (dAtA []byte, err error) { +func (m *TraceByIDMetrics) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3367,46 +3703,20 @@ func (m *SearchResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *TraceByIDMetrics) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SearchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TraceByIDMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Metrics != nil { - { - size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Traces) > 0 { - for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Traces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } -func (m *TraceSearchMetadata) Marshal() (dAtA []byte, err error) { +func (m *SearchRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3416,77 +3726,76 @@ func (m *TraceSearchMetadata) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TraceSearchMetadata) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TraceSearchMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.SpanSets) > 0 { - for iNdEx := len(m.SpanSets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SpanSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } + if m.SpansPerSpanSet != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.SpansPerSpanSet)) + i-- + dAtA[i] = 0x48 } - if m.SpanSet != nil { - { - size, err := m.SpanSet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x42 } - if m.DurationMs != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.DurationMs)) + if m.End != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x30 + } + if m.Start != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Start)) i-- dAtA[i] = 0x28 } - if m.StartTimeUnixNano != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.StartTimeUnixNano)) + if m.Limit != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Limit)) i-- dAtA[i] = 0x20 } - if len(m.RootTraceName) > 0 { - i -= len(m.RootTraceName) - copy(dAtA[i:], m.RootTraceName) - i = encodeVarintTempo(dAtA, i, uint64(len(m.RootTraceName))) + if m.MaxDurationMs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.MaxDurationMs)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x18 } - if len(m.RootServiceName) > 0 { - i -= len(m.RootServiceName) - copy(dAtA[i:], m.RootServiceName) - i = encodeVarintTempo(dAtA, i, uint64(len(m.RootServiceName))) + if m.MinDurationMs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.MinDurationMs)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if len(m.TraceID) > 0 { - i -= len(m.TraceID) - copy(dAtA[i:], m.TraceID) - i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) - i-- - dAtA[i] = 0xa + if len(m.Tags) > 0 { + for k := range m.Tags { + v := m.Tags[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintTempo(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintTempo(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintTempo(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *SpanSet) Marshal() (dAtA []byte, err error) { +func (m *SearchBlockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3496,20 +3805,20 @@ func (m *SpanSet) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpanSet) MarshalTo(dAtA []byte) (int, error) { +func (m *SearchBlockRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SearchBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + if len(m.DedicatedColumns) > 0 { + for iNdEx := len(m.DedicatedColumns) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.DedicatedColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3517,32 +3826,83 @@ func (m *SpanSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTempo(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x62 } } - if m.Matched != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Matched)) + if m.FooterSize != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.FooterSize)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x58 } - if len(m.Spans) > 0 { - for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) + if m.Size_ != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Size_)) + i-- + dAtA[i] = 0x50 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x4a + } + if len(m.DataEncoding) > 0 { + i -= len(m.DataEncoding) + copy(dAtA[i:], m.DataEncoding) + i = encodeVarintTempo(dAtA, i, uint64(len(m.DataEncoding))) + i-- + dAtA[i] = 0x42 + } + if m.TotalRecords != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.TotalRecords)) + i-- + dAtA[i] = 0x38 + } + if m.IndexPageSize != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.IndexPageSize)) + i-- + dAtA[i] = 0x30 + } + if len(m.Encoding) > 0 { + i -= len(m.Encoding) + copy(dAtA[i:], m.Encoding) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Encoding))) + i-- + dAtA[i] = 0x2a + } + if m.PagesToSearch != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.PagesToSearch)) + i-- + dAtA[i] = 0x20 + } + if m.StartPage != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.StartPage)) + i-- + dAtA[i] = 0x18 + } + if len(m.BlockID) > 0 { + i -= len(m.BlockID) + copy(dAtA[i:], m.BlockID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.BlockID))) + i-- + dAtA[i] = 0x12 + } + if m.SearchReq != nil { + { + size, err := m.SearchReq.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Span) Marshal() (dAtA []byte, err error) { +func (m *DedicatedColumn) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3552,22 +3912,247 @@ func (m *Span) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Span) MarshalTo(dAtA []byte) (int, error) { +func (m *DedicatedColumn) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DedicatedColumn) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Scope != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Scope)) + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.Type != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SearchResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SearchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Metrics != nil { + { + size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Traces) > 0 { + for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Traces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TraceSearchMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TraceSearchMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceSearchMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SpanSets) > 0 { + for iNdEx := len(m.SpanSets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpanSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if m.SpanSet != nil { + { + size, err := m.SpanSet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.DurationMs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.DurationMs)) + i-- + dAtA[i] = 0x28 + } + if m.StartTimeUnixNano != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.StartTimeUnixNano)) + i-- + dAtA[i] = 0x20 + } + if len(m.RootTraceName) > 0 { + i -= len(m.RootTraceName) + copy(dAtA[i:], m.RootTraceName) + i = encodeVarintTempo(dAtA, i, uint64(len(m.RootTraceName))) + i-- + dAtA[i] = 0x1a + } + if len(m.RootServiceName) > 0 { + i -= len(m.RootServiceName) + copy(dAtA[i:], m.RootServiceName) + i = encodeVarintTempo(dAtA, i, uint64(len(m.RootServiceName))) + i-- + dAtA[i] = 0x12 + } + if len(m.TraceID) > 0 { + i -= len(m.TraceID) + copy(dAtA[i:], m.TraceID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpanSet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpanSet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Matched != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Matched)) + i-- + dAtA[i] = 0x10 + } + if len(m.Spans) > 0 { + for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Span) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Span) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } i -= size i = encodeVarintTempo(dAtA, i, uint64(size)) @@ -4404,7 +4989,7 @@ func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SpanMetrics) Marshal() (dAtA []byte, err error) { +func (m *RawExemplar) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4414,39 +4999,74 @@ func (m *SpanMetrics) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpanMetrics) MarshalTo(dAtA []byte) (int, error) { +func (m *RawExemplar) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpanMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RawExemplar) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Errors != 0 { - i = encodeVarintTempo(dAtA, i, uint64(m.Errors)) + if m.Val != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Val)) i-- - dAtA[i] = 0x18 - } - if len(m.Series) > 0 { - for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTempo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + dAtA[i] = 0x10 } - if len(m.LatencyHistogram) > 0 { - for iNdEx := len(m.LatencyHistogram) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LatencyHistogram[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if len(m.TraceID) > 0 { + i -= len(m.TraceID) + copy(dAtA[i:], m.TraceID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.TraceID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpanMetrics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpanMetrics) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Errors != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Errors)) + i-- + dAtA[i] = 0x18 + } + if len(m.Series) > 0 { + for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.LatencyHistogram) > 0 { + for iNdEx := len(m.LatencyHistogram) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LatencyHistogram[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4635,110 +5255,435 @@ func (m *TraceQLStatic) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintTempo(dAtA []byte, offset int, v uint64) int { - offset -= sovTempo(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *SpanMetricsData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *TraceByIDRequest) Size() (n int) { - if m == nil { - return 0 - } + +func (m *SpanMetricsData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetricsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.TraceID) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.BlockStart) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - l = len(m.BlockEnd) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if len(m.Result) > 0 { + for iNdEx := len(m.Result) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Result[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - l = len(m.QueryMode) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if len(m.ResultType) > 0 { + i -= len(m.ResultType) + copy(dAtA[i:], m.ResultType) + i = encodeVarintTempo(dAtA, i, uint64(len(m.ResultType))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *TraceByIDResponse) Size() (n int) { - if m == nil { - return 0 +func (m *SpanMetricsResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SpanMetricsResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetricsResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Trace != nil { - l = m.Trace.Size() - n += 1 + l + sovTempo(uint64(l)) + if len(m.Ts) > 0 { + for iNdEx := len(m.Ts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Ts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - if m.Metrics != nil { - l = m.Metrics.Size() - n += 1 + l + sovTempo(uint64(l)) + if len(m.LabelValue) > 0 { + i -= len(m.LabelValue) + copy(dAtA[i:], m.LabelValue) + i = encodeVarintTempo(dAtA, i, uint64(len(m.LabelValue))) + i-- + dAtA[i] = 0x12 } - return n + if len(m.LabelName) > 0 { + i -= len(m.LabelName) + copy(dAtA[i:], m.LabelName) + i = encodeVarintTempo(dAtA, i, uint64(len(m.LabelName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *TraceByIDMetrics) Size() (n int) { - if m == nil { - return 0 +func (m *SpanMetricsResultPoint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SpanMetricsResultPoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpanMetricsResultPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + if m.ExemplarDuration != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.ExemplarDuration)) + i-- + dAtA[i] = 0x20 + } + if len(m.ExemplarTraceID) > 0 { + i -= len(m.ExemplarTraceID) + copy(dAtA[i:], m.ExemplarTraceID) + i = encodeVarintTempo(dAtA, i, uint64(len(m.ExemplarTraceID))) + i-- + dAtA[i] = 0x1a + } + if m.Val != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Val)))) + i-- + dAtA[i] = 0x11 + } + if m.Time != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Time)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *SearchRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRangeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryRangeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Tags) > 0 { - for k, v := range m.Tags { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTempo(uint64(len(k))) + 1 + len(v) + sovTempo(uint64(len(v))) - n += mapEntrySize + 1 + sovTempo(uint64(mapEntrySize)) - } - } - if m.MinDurationMs != 0 { - n += 1 + sovTempo(uint64(m.MinDurationMs)) - } - if m.MaxDurationMs != 0 { - n += 1 + sovTempo(uint64(m.MaxDurationMs)) + if m.Of != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Of)) + i-- + dAtA[i] = 0x30 } - if m.Limit != 0 { - n += 1 + sovTempo(uint64(m.Limit)) + if m.Shard != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Shard)) + i-- + dAtA[i] = 0x28 } - if m.Start != 0 { - n += 1 + sovTempo(uint64(m.Start)) + if m.Step != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Step)) + i-- + dAtA[i] = 0x20 } if m.End != 0 { - n += 1 + sovTempo(uint64(m.End)) + i = encodeVarintTempo(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x18 } - l = len(m.Query) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) + if m.Start != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x10 } - if m.SpansPerSpanSet != 0 { - n += 1 + sovTempo(uint64(m.SpansPerSpanSet)) + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarintTempo(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *SearchBlockRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRangeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryRangeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Series) > 0 { + for iNdEx := len(m.Series) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Series[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Sample) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Sample) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TimestampMs != 0 { + i = encodeVarintTempo(dAtA, i, uint64(m.TimestampMs)) + i-- + dAtA[i] = 0x10 + } + if m.Value != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *TimeSeries) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TimeSeries) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimeSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PromLabels) > 0 { + i -= len(m.PromLabels) + copy(dAtA[i:], m.PromLabels) + i = encodeVarintTempo(dAtA, i, uint64(len(m.PromLabels))) + i-- + dAtA[i] = 0x1a + } + if len(m.Samples) > 0 { + for iNdEx := len(m.Samples) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Samples[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Labels) > 0 { + for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Labels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTempo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintTempo(dAtA []byte, offset int, v uint64) int { + offset -= sovTempo(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TraceByIDRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TraceID) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.BlockStart) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.BlockEnd) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.QueryMode) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + return n +} + +func (m *TraceByIDResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Trace != nil { + l = m.Trace.Size() + n += 1 + l + sovTempo(uint64(l)) + } + if m.Metrics != nil { + l = m.Metrics.Size() + n += 1 + l + sovTempo(uint64(l)) + } + return n +} + +func (m *TraceByIDMetrics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *SearchRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Tags) > 0 { + for k, v := range m.Tags { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTempo(uint64(len(k))) + 1 + len(v) + sovTempo(uint64(len(v))) + n += mapEntrySize + 1 + sovTempo(uint64(mapEntrySize)) + } + } + if m.MinDurationMs != 0 { + n += 1 + sovTempo(uint64(m.MinDurationMs)) + } + if m.MaxDurationMs != 0 { + n += 1 + sovTempo(uint64(m.MaxDurationMs)) + } + if m.Limit != 0 { + n += 1 + sovTempo(uint64(m.Limit)) + } + if m.Start != 0 { + n += 1 + sovTempo(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sovTempo(uint64(m.End)) + } + l = len(m.Query) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.SpansPerSpanSet != 0 { + n += 1 + sovTempo(uint64(m.SpansPerSpanSet)) + } + return n +} + +func (m *SearchBlockRequest) Size() (n int) { + if m == nil { + return 0 } var l int _ = l @@ -5274,6 +6219,22 @@ func (m *KeyValue) Size() (n int) { return n } +func (m *RawExemplar) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TraceID) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.Val != 0 { + n += 1 + sovTempo(uint64(m.Val)) + } + return n +} + func (m *SpanMetrics) Size() (n int) { if m == nil { return 0 @@ -5315,78 +6276,577 @@ func (m *SpanMetricsSummary) Size() (n int) { l = e.Size() n += 1 + l + sovTempo(uint64(l)) } - } - if m.P99 != 0 { - n += 1 + sovTempo(uint64(m.P99)) - } - if m.P95 != 0 { - n += 1 + sovTempo(uint64(m.P95)) - } - if m.P90 != 0 { - n += 1 + sovTempo(uint64(m.P90)) - } - if m.P50 != 0 { - n += 1 + sovTempo(uint64(m.P50)) - } - return n -} - -func (m *SpanMetricsSummaryResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Summaries) > 0 { - for _, e := range m.Summaries { - l = e.Size() - n += 1 + l + sovTempo(uint64(l)) + } + if m.P99 != 0 { + n += 1 + sovTempo(uint64(m.P99)) + } + if m.P95 != 0 { + n += 1 + sovTempo(uint64(m.P95)) + } + if m.P90 != 0 { + n += 1 + sovTempo(uint64(m.P90)) + } + if m.P50 != 0 { + n += 1 + sovTempo(uint64(m.P50)) + } + return n +} + +func (m *SpanMetricsSummaryResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Summaries) > 0 { + for _, e := range m.Summaries { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *TraceQLStatic) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovTempo(uint64(m.Type)) + } + if m.N != 0 { + n += 1 + sovTempo(uint64(m.N)) + } + if m.F != 0 { + n += 9 + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.B { + n += 2 + } + if m.D != 0 { + n += 1 + sovTempo(uint64(m.D)) + } + if m.Status != 0 { + n += 1 + sovTempo(uint64(m.Status)) + } + if m.Kind != 0 { + n += 1 + sovTempo(uint64(m.Kind)) + } + return n +} + +func (m *SpanMetricsData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ResultType) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if len(m.Result) > 0 { + for _, e := range m.Result { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *SpanMetricsResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.LabelName) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + l = len(m.LabelValue) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if len(m.Ts) > 0 { + for _, e := range m.Ts { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *SpanMetricsResultPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Time != 0 { + n += 1 + sovTempo(uint64(m.Time)) + } + if m.Val != 0 { + n += 9 + } + l = len(m.ExemplarTraceID) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.ExemplarDuration != 0 { + n += 1 + sovTempo(uint64(m.ExemplarDuration)) + } + return n +} + +func (m *QueryRangeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + if m.Start != 0 { + n += 1 + sovTempo(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sovTempo(uint64(m.End)) + } + if m.Step != 0 { + n += 1 + sovTempo(uint64(m.Step)) + } + if m.Shard != 0 { + n += 1 + sovTempo(uint64(m.Shard)) + } + if m.Of != 0 { + n += 1 + sovTempo(uint64(m.Of)) + } + return n +} + +func (m *QueryRangeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Series) > 0 { + for _, e := range m.Series { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + return n +} + +func (m *Sample) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 9 + } + if m.TimestampMs != 0 { + n += 1 + sovTempo(uint64(m.TimestampMs)) + } + return n +} + +func (m *TimeSeries) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Labels) > 0 { + for _, e := range m.Labels { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + if len(m.Samples) > 0 { + for _, e := range m.Samples { + l = e.Size() + n += 1 + l + sovTempo(uint64(l)) + } + } + l = len(m.PromLabels) + if l > 0 { + n += 1 + l + sovTempo(uint64(l)) + } + return n +} + +func sovTempo(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTempo(x uint64) (n int) { + return sovTempo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceByIDRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TraceID = append(m.TraceID[:0], dAtA[iNdEx:postIndex]...) + if m.TraceID == nil { + m.TraceID = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockStart", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + 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 ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockStart = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockEnd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + 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 ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockEnd = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + 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 ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QueryMode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceByIDResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Trace", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Trace == nil { + m.Trace = &Trace{} + } + if err := m.Trace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metrics == nil { + m.Metrics = &TraceByIDMetrics{} + } + if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceByIDMetrics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceByIDMetrics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceByIDMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - return n -} -func (m *TraceQLStatic) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovTempo(uint64(m.Type)) - } - if m.N != 0 { - n += 1 + sovTempo(uint64(m.N)) - } - if m.F != 0 { - n += 9 - } - l = len(m.S) - if l > 0 { - n += 1 + l + sovTempo(uint64(l)) - } - if m.B { - n += 2 - } - if m.D != 0 { - n += 1 + sovTempo(uint64(m.D)) - } - if m.Status != 0 { - n += 1 + sovTempo(uint64(m.Status)) - } - if m.Kind != 0 { - n += 1 + sovTempo(uint64(m.Kind)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sovTempo(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTempo(x uint64) (n int) { - return sovTempo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { +func (m *SearchRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5409,17 +6869,17 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceByIDRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5429,31 +6889,181 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.TraceID = append(m.TraceID[:0], dAtA[iNdEx:postIndex]...) - if m.TraceID == nil { - m.TraceID = []byte{} + if m.Tags == nil { + m.Tags = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTempo + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTempo + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTempo + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthTempo + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Tags[mapkey] = mapvalue iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockStart", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDurationMs", wireType) + } + m.MinDurationMs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinDurationMs |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxDurationMs", wireType) + } + m.MaxDurationMs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxDurationMs |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - var stringLen uint64 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5463,27 +7073,33 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Start |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - m.BlockStart = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockEnd", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5511,13 +7127,13 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BlockEnd = string(dAtA[iNdEx:postIndex]) + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryMode", wireType) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpansPerSpanSet", wireType) } - var stringLen uint64 + m.SpansPerSpanSet = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5527,24 +7143,11 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SpansPerSpanSet |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueryMode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -5566,7 +7169,7 @@ func (m *TraceByIDRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { +func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5589,15 +7192,15 @@ func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceByIDResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SearchBlockRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Trace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchReq", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5624,18 +7227,18 @@ func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Trace == nil { - m.Trace = &Trace{} + if m.SearchReq == nil { + m.SearchReq = &SearchRequest{} } - if err := m.Trace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SearchReq.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5645,133 +7248,137 @@ func (m *TraceByIDResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Metrics == nil { - m.Metrics = &TraceByIDMetrics{} - } - if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.BlockID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartPage", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTempo + m.StartPage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartPage |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesToSearch", wireType) } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TraceByIDMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo + m.PagesToSearch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PagesToSearch |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TraceByIDMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceByIDMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthTempo } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo + m.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IndexPageSize", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.IndexPageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IndexPageSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalRecords", wireType) + } + m.TotalRecords = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalRecords |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DataEncoding", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5781,124 +7388,29 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Tags == nil { - m.Tags = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTempo - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTempo - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTempo - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTempo - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTempo - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Tags[mapkey] = mapvalue + m.DataEncoding = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinDurationMs", wireType) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } - m.MinDurationMs = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5908,16 +7420,29 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MinDurationMs |= uint32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 3: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxDurationMs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) } - m.MaxDurationMs = 0 + m.Size_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5927,16 +7452,16 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxDurationMs |= uint32(b&0x7F) << shift + m.Size_ |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 11: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FooterSize", wireType) } - m.Limit = 0 + m.FooterSize = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5946,16 +7471,16 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= uint32(b&0x7F) << shift + m.FooterSize |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DedicatedColumns", wireType) } - m.Start = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5965,16 +7490,81 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= uint32(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DedicatedColumns = append(m.DedicatedColumns, &DedicatedColumn{}) + if err := m.DedicatedColumns[len(m.DedicatedColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DedicatedColumn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DedicatedColumn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - m.End = 0 + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -5984,14 +7574,14 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= uint32(b&0x7F) << shift + m.Type |= DedicatedColumn_Type(b&0x7F) << shift if b < 0x80 { break } } - case 8: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6019,13 +7609,13 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpansPerSpanSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } - m.SpansPerSpanSet = 0 + m.Scope = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6035,7 +7625,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SpansPerSpanSet |= uint32(b&0x7F) << shift + m.Scope |= DedicatedColumn_Scope(b&0x7F) << shift if b < 0x80 { break } @@ -6061,7 +7651,7 @@ func (m *SearchRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { +func (m *SearchResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6084,15 +7674,15 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchBlockRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchReq", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6119,18 +7709,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SearchReq == nil { - m.SearchReq = &SearchRequest{} - } - if err := m.SearchReq.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Traces = append(m.Traces, &TraceSearchMetadata{}) + if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6140,29 +7728,83 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.BlockID = string(dAtA[iNdEx:postIndex]) + if m.Metrics == nil { + m.Metrics = &SearchMetrics{} + } + if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartPage", wireType) + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err } - m.StartPage = 0 + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceSearchMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceSearchMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6172,16 +7814,29 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.StartPage |= uint32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PagesToSearch", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo } - m.PagesToSearch = 0 + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TraceID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootServiceName", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6191,14 +7846,27 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PagesToSearch |= uint32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootServiceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RootTraceName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6226,13 +7894,13 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Encoding = string(dAtA[iNdEx:postIndex]) + m.RootTraceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IndexPageSize", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) } - m.IndexPageSize = 0 + m.StartTimeUnixNano = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6242,16 +7910,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.IndexPageSize |= uint32(b&0x7F) << shift + m.StartTimeUnixNano |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 7: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRecords", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DurationMs", wireType) } - m.TotalRecords = 0 + m.DurationMs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6261,16 +7929,16 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalRecords |= uint32(b&0x7F) << shift + m.DurationMs |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 8: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataEncoding", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SpanSet", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6280,29 +7948,117 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SpanSet == nil { + m.SpanSet = &SpanSet{} + } + if err := m.SpanSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanSets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.DataEncoding = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: + m.SpanSets = append(m.SpanSets, &SpanSet{}) + if err := m.SpanSets[len(m.SpanSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpanSet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpanSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpanSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6312,48 +8068,31 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) - } - m.Size_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size_ |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + m.Spans = append(m.Spans, &Span{}) + if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - case 11: + iNdEx = postIndex + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FooterSize", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Matched", wireType) } - m.FooterSize = 0 + m.Matched = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6363,14 +8102,14 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FooterSize |= uint32(b&0x7F) << shift + m.Matched |= uint32(b&0x7F) << shift if b < 0x80 { break } } - case 12: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DedicatedColumns", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6397,8 +8136,8 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DedicatedColumns = append(m.DedicatedColumns, &DedicatedColumn{}) - if err := m.DedicatedColumns[len(m.DedicatedColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Attributes = append(m.Attributes, &v1.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6423,7 +8162,7 @@ func (m *SearchBlockRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { +func (m *Span) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6446,17 +8185,17 @@ func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DedicatedColumn: wiretype end group for non-group") + return fmt.Errorf("proto: Span: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DedicatedColumn: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) } - m.Type = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6466,11 +8205,24 @@ func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Type |= DedicatedColumn_Type(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpanID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) @@ -6505,9 +8257,9 @@ func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) } - m.Scope = 0 + m.StartTimeUnixNano = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6517,11 +8269,64 @@ func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Scope |= DedicatedColumn_Scope(b&0x7F) << shift + m.StartTimeUnixNano |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) + } + m.DurationNanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DurationNanos |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &v1.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -6543,7 +8348,7 @@ func (m *DedicatedColumn) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchResponse) Unmarshal(dAtA []byte) error { +func (m *SearchMetrics) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6566,17 +8371,17 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SearchMetrics: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchMetrics: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InspectedTraces", wireType) } - var msglen int + m.InspectedTraces = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6586,31 +8391,54 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.InspectedTraces |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InspectedBytes", wireType) } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo + m.InspectedBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InspectedBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBlocks", wireType) } - m.Traces = append(m.Traces, &TraceSearchMetadata{}) - if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.TotalBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalBlocks |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletedJobs", wireType) } - var msglen int + m.CompletedJobs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6620,28 +8448,49 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.CompletedJobs |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalJobs", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + m.TotalJobs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalJobs |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } } - if m.Metrics == nil { - m.Metrics = &SearchMetrics{} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBlockBytes", wireType) } - if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.TotalBlockBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalBlockBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -6663,7 +8512,7 @@ func (m *SearchResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { +func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6686,15 +8535,15 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceSearchMetadata: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceSearchMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6722,43 +8571,61 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TraceID = string(dAtA[iNdEx:postIndex]) + m.Scope = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootServiceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.RootServiceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchTagsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchTagsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootTraceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TagNames", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6786,85 +8653,61 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RootTraceName = string(dAtA[iNdEx:postIndex]) + m.TagNames = append(m.TagNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartTimeUnixNano |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationMs", wireType) - } - m.DurationMs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationMs |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTempo + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTempo } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.SpanSet == nil { - m.SpanSet = &SpanSet{} + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo } - if err := m.SpanSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 7: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchTagsV2Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchTagsV2Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanSets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6891,8 +8734,8 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SpanSets = append(m.SpanSets, &SpanSet{}) - if err := m.SpanSets[len(m.SpanSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Scopes = append(m.Scopes, &SearchTagsV2Scope{}) + if err := m.Scopes[len(m.Scopes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6917,7 +8760,7 @@ func (m *TraceSearchMetadata) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanSet) Unmarshal(dAtA []byte) error { +func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6940,17 +8783,17 @@ func (m *SpanSet) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanSet: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagsV2Scope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagsV2Scope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -6960,50 +8803,29 @@ func (m *SpanSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Spans = append(m.Spans, &Span{}) - if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Matched", wireType) - } - m.Matched = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Matched |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7013,25 +8835,23 @@ func (m *SpanSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes, &v1.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -7054,7 +8874,7 @@ func (m *SpanSet) Unmarshal(dAtA []byte) error { } return nil } -func (m *Span) Unmarshal(dAtA []byte) error { +func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7077,15 +8897,15 @@ func (m *Span) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Span: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagValuesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagValuesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TagName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7113,11 +8933,11 @@ func (m *Span) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SpanID = string(dAtA[iNdEx:postIndex]) + m.TagName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7145,51 +8965,63 @@ func (m *Span) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err } - m.StartTimeUnixNano = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartTimeUnixNano |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - m.DurationNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationNanos |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo } - case 5: + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchTagValuesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchTagValuesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TagValues", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7199,25 +9031,23 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes, &v1.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.TagValues = append(m.TagValues, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -7240,7 +9070,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchMetrics) Unmarshal(dAtA []byte) error { +func (m *TagValue) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7263,17 +9093,17 @@ func (m *SearchMetrics) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchMetrics: wiretype end group for non-group") + return fmt.Errorf("proto: TagValue: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TagValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InspectedTraces", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - m.InspectedTraces = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7283,54 +9113,29 @@ func (m *SearchMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.InspectedTraces |= uint32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InspectedBytes", wireType) - } - m.InspectedBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InspectedBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBlocks", wireType) + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo } - m.TotalBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalBlocks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + if postIndex > l { + return io.ErrUnexpectedEOF } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletedJobs", wireType) + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - m.CompletedJobs = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7340,49 +9145,24 @@ func (m *SearchMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CompletedJobs |= uint32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalJobs", wireType) - } - m.TotalJobs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalJobs |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBlockBytes", wireType) + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo } - m.TotalBlockBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalBlockBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -7404,7 +9184,7 @@ func (m *SearchMetrics) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { +func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7427,17 +9207,17 @@ func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SearchTagValuesV2Response: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchTagValuesV2Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TagValues", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7447,23 +9227,25 @@ func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Scope = string(dAtA[iNdEx:postIndex]) + m.TagValues = append(m.TagValues, &TagValue{}) + if err := m.TagValues[len(m.TagValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7486,7 +9268,7 @@ func (m *SearchTagsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { +func (m *Trace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7509,17 +9291,17 @@ func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Trace: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Trace: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7529,23 +9311,25 @@ func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.TagNames = append(m.TagNames, string(dAtA[iNdEx:postIndex])) + m.Batches = append(m.Batches, &v11.ResourceSpans{}) + if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7568,7 +9352,7 @@ func (m *SearchTagsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { +func (m *PushResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7591,46 +9375,12 @@ func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagsV2Response: wiretype end group for non-group") + return fmt.Errorf("proto: PushResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagsV2Response: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PushResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scopes = append(m.Scopes, &SearchTagsV2Scope{}) - if err := m.Scopes[len(m.Scopes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -7652,7 +9402,7 @@ func (m *SearchTagsV2Response) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { +func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7675,17 +9425,17 @@ func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagsV2Scope: wiretype end group for non-group") + return fmt.Errorf("proto: PushBytesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagsV2Scope: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PushBytesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7695,29 +9445,32 @@ func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + var v PreallocBytes + m.Traces = append(m.Traces, v) + if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7727,23 +9480,61 @@ func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex])) + var v PreallocBytes + m.Ids = append(m.Ids, v) + if err := m.Ids[len(m.Ids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v PreallocBytes + m.SearchData = append(m.SearchData, v) + if err := m.SearchData[len(m.SearchData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7766,7 +9557,7 @@ func (m *SearchTagsV2Scope) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { +func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7789,17 +9580,17 @@ func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagValuesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: PushSpansRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagValuesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PushSpansRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7809,29 +9600,81 @@ func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.TagName = string(dAtA[iNdEx:postIndex]) + m.Batches = append(m.Batches, &v11.ResourceSpans{}) + if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceBytes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceBytes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceBytes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7841,23 +9684,23 @@ func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + m.Traces = append(m.Traces, make([]byte, postIndex-iNdEx)) + copy(m.Traces[len(m.Traces)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7880,7 +9723,7 @@ func (m *SearchTagValuesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { +func (m *LinkSlice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7903,17 +9746,17 @@ func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagValuesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: LinkSlice: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagValuesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LinkSlice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagValues", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -7923,23 +9766,25 @@ func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.TagValues = append(m.TagValues, string(dAtA[iNdEx:postIndex])) + m.Links = append(m.Links, &v11.Span_Link{}) + if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -7962,7 +9807,7 @@ func (m *SearchTagValuesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TagValue) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7985,15 +9830,15 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TagValue: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TagValue: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8021,11 +9866,11 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8053,8 +9898,65 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = string(dAtA[iNdEx:postIndex]) + m.GroupBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -8076,7 +9978,7 @@ func (m *TagValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8099,17 +10001,17 @@ func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchTagValuesV2Response: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsSummaryRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchTagValuesV2Response: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsSummaryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagValues", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8119,26 +10021,113 @@ func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.TagValues = append(m.TagValues, &TagValue{}) - if err := m.TagValues[len(m.TagValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + 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 ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.GroupBy = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -8160,7 +10149,7 @@ func (m *SearchTagValuesV2Response) Unmarshal(dAtA []byte) error { } return nil } -func (m *Trace) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8183,15 +10172,73 @@ func (m *Trace) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Trace: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Trace: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Estimated", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Estimated = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanCount", wireType) + } + m.SpanCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpanCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorSpanCount", wireType) + } + m.ErrorSpanCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrorSpanCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8217,9 +10264,9 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } if postIndex > l { return io.ErrUnexpectedEOF - } - m.Batches = append(m.Batches, &v11.ResourceSpans{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + } + m.Metrics = append(m.Metrics, &SpanMetrics{}) + if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8244,7 +10291,7 @@ func (m *Trace) Unmarshal(dAtA []byte) error { } return nil } -func (m *PushResponse) Unmarshal(dAtA []byte) error { +func (m *RawHistogram) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8267,12 +10314,50 @@ func (m *PushResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PushResponse: wiretype end group for non-group") + return fmt.Errorf("proto: RawHistogram: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PushResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RawHistogram: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bucket", wireType) + } + m.Bucket = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Bucket |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -8294,7 +10379,7 @@ func (m *PushResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { +func (m *KeyValue) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8317,17 +10402,17 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PushBytesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PushBytesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 2: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8337,32 +10422,29 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - var v PreallocBytes - m.Traces = append(m.Traces, v) - if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8372,59 +10454,25 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - var v PreallocBytes - m.Ids = append(m.Ids, v) - if err := m.Ids[len(m.Ids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.Value == nil { + m.Value = &TraceQLStatic{} } - var v PreallocBytes - m.SearchData = append(m.SearchData, v) - if err := m.SearchData[len(m.SearchData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8449,7 +10497,7 @@ func (m *PushBytesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { +func (m *RawExemplar) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8472,17 +10520,17 @@ func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PushSpansRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RawExemplar: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PushSpansRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RawExemplar: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8492,26 +10540,45 @@ func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Batches = append(m.Batches, &v11.ResourceSpans{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.TraceID = append(m.TraceID[:0], dAtA[iNdEx:postIndex]...) + if m.TraceID == nil { + m.TraceID = []byte{} } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType) + } + m.Val = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Val |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -8533,7 +10600,7 @@ func (m *PushSpansRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceBytes) Unmarshal(dAtA []byte) error { +func (m *SpanMetrics) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8556,17 +10623,17 @@ func (m *TraceBytes) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceBytes: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetrics: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceBytes: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetrics: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LatencyHistogram", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8576,79 +10643,65 @@ func (m *TraceBytes) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Traces = append(m.Traces, make([]byte, postIndex-iNdEx)) - copy(m.Traces[len(m.Traces)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { + m.LatencyHistogram = append(m.LatencyHistogram, &RawHistogram{}) + if err := m.LatencyHistogram[len(m.LatencyHistogram)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTempo + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LinkSlice) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo + if msglen < 0 { + return ErrInvalidLengthTempo } - if iNdEx >= l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Series = append(m.Series, &KeyValue{}) + if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LinkSlice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LinkSlice: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } - var msglen int + m.Errors = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8658,26 +10711,11 @@ func (m *LinkSlice) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Errors |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Links = append(m.Links, &v11.Span_Link{}) - if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) @@ -8699,7 +10737,7 @@ func (m *LinkSlice) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8722,17 +10760,17 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsSummary: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsSummary: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanCount", wireType) } - var stringLen uint64 + m.SpanCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8742,29 +10780,35 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.SpanCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorSpanCount", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + m.ErrorSpanCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrorSpanCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - m.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8774,29 +10818,31 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.GroupBy = string(dAtA[iNdEx:postIndex]) + m.Series = append(m.Series, &KeyValue{}) + if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field P99", wireType) } - m.Limit = 0 + m.P99 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8806,16 +10852,16 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= uint64(b&0x7F) << shift + m.P99 |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field P95", wireType) } - m.Start = 0 + m.P95 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8825,16 +10871,16 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= uint32(b&0x7F) << shift + m.P95 |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field P90", wireType) } - m.End = 0 + m.P90 = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8844,7 +10890,26 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= uint32(b&0x7F) << shift + m.P90 |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field P50", wireType) + } + m.P50 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.P50 |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8870,7 +10935,7 @@ func (m *SpanMetricsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8893,15 +10958,148 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsSummaryRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsSummaryResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsSummaryRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsSummaryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Summaries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Summaries = append(m.Summaries, &SpanMetricsSummary{}) + if err := m.Summaries[len(m.Summaries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceQLStatic: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceQLStatic: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + } + m.N = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.N |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.F = float64(math.Float64frombits(v)) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8929,13 +11127,13 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + m.S = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8945,29 +11143,17 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupBy = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + m.B = bool(v != 0) + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) } - m.Limit = 0 + m.D = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8977,16 +11163,16 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Limit |= uint64(b&0x7F) << shift + m.D |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.Start = 0 + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -8996,16 +11182,16 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= uint32(b&0x7F) << shift + m.Status |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 5: + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } - m.End = 0 + m.Kind = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9015,7 +11201,7 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= uint32(b&0x7F) << shift + m.Kind |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -9041,7 +11227,7 @@ func (m *SpanMetricsSummaryRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsData) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9064,17 +11250,17 @@ func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsData: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Estimated", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultType", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9084,53 +11270,27 @@ func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Estimated = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanCount", wireType) - } - m.SpanCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SpanCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorSpanCount", wireType) + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo } - m.ErrorSpanCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ErrorSpanCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if postIndex > l { + return io.ErrUnexpectedEOF } - case 4: + m.ResultType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9157,8 +11317,8 @@ func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Metrics = append(m.Metrics, &SpanMetrics{}) - if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Result = append(m.Result, &SpanMetricsResult{}) + if err := m.Result[len(m.Result)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9183,7 +11343,7 @@ func (m *SpanMetricsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *RawHistogram) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9206,36 +11366,17 @@ func (m *RawHistogram) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RawHistogram: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RawHistogram: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Bucket", wireType) - } - m.Bucket = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Bucket |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelName", wireType) } - m.Count = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9245,64 +11386,27 @@ func (m *RawHistogram) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Count |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipTempo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTempo } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.LabelName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LabelValue", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9330,11 +11434,11 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) + m.LabelValue = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9361,10 +11465,8 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Value == nil { - m.Value = &TraceQLStatic{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Ts = append(m.Ts, &SpanMetricsResultPoint{}) + if err := m.Ts[len(m.Ts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9389,7 +11491,7 @@ func (m *KeyValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetrics) Unmarshal(dAtA []byte) error { +func (m *SpanMetricsResultPoint) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9412,17 +11514,17 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetrics: wiretype end group for non-group") + return fmt.Errorf("proto: SpanMetricsResultPoint: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpanMetricsResultPoint: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatencyHistogram", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) } - var msglen int + m.Time = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9432,31 +11534,27 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Time |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType) } - if postIndex > l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - m.LatencyHistogram = append(m.LatencyHistogram, &RawHistogram{}) - if err := m.LatencyHistogram[len(m.LatencyHistogram)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Val = float64(math.Float64frombits(v)) + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExemplarTraceID", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9466,31 +11564,31 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.Series = append(m.Series, &KeyValue{}) - if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.ExemplarTraceID = append(m.ExemplarTraceID[:0], dAtA[iNdEx:postIndex]...) + if m.ExemplarTraceID == nil { + m.ExemplarTraceID = []byte{} } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExemplarDuration", wireType) } - m.Errors = 0 + m.ExemplarDuration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9500,7 +11598,7 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Errors |= uint64(b&0x7F) << shift + m.ExemplarDuration |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -9526,7 +11624,7 @@ func (m *SpanMetrics) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { +func (m *QueryRangeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9549,17 +11647,17 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsSummary: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRangeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsSummary: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanCount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - m.SpanCount = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9569,16 +11667,29 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SpanCount |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorSpanCount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) } - m.ErrorSpanCount = 0 + m.Start = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9588,16 +11699,16 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ErrorSpanCount |= uint64(b&0x7F) << shift + m.Start |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) } - var msglen int + m.End = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9607,31 +11718,16 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.End |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTempo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTempo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Series = append(m.Series, &KeyValue{}) - if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P99", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) } - m.P99 = 0 + m.Step = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9641,16 +11737,16 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.P99 |= uint64(b&0x7F) << shift + m.Step |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P95", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Shard", wireType) } - m.P95 = 0 + m.Shard = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9660,35 +11756,16 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.P95 |= uint64(b&0x7F) << shift + m.Shard |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P90", wireType) - } - m.P90 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.P90 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field P50", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Of", wireType) } - m.P50 = 0 + m.Of = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9698,7 +11775,7 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.P50 |= uint64(b&0x7F) << shift + m.Of |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -9724,7 +11801,7 @@ func (m *SpanMetricsSummary) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRangeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9747,15 +11824,15 @@ func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpanMetricsSummaryResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRangeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpanMetricsSummaryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Summaries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9782,8 +11859,8 @@ func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Summaries = append(m.Summaries, &SpanMetricsSummary{}) - if err := m.Summaries[len(m.Summaries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Series = append(m.Series, &TimeSeries{}) + if err := m.Series[len(m.Series)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9808,7 +11885,7 @@ func (m *SpanMetricsSummaryResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { +func (m *Sample) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9831,36 +11908,28 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceQLStatic: wiretype end group for non-group") + return fmt.Errorf("proto: Sample: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceQLStatic: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Sample: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field N", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TimestampMs", wireType) } - m.N = 0 + m.TimestampMs = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9870,27 +11939,66 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.N |= int64(b&0x7F) << shift + m.TimestampMs |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + default: + iNdEx = preIndex + skippy, err := skipTempo(dAtA[iNdEx:]) + if err != nil { + return err } - var v uint64 - if (iNdEx + 8) > l { + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTempo + } + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.F = float64(math.Float64frombits(v)) - case 4: + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TimeSeries) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTempo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TimeSeries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeSeries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9900,29 +12008,31 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTempo } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTempo } if postIndex > l { return io.ErrUnexpectedEOF } - m.S = string(dAtA[iNdEx:postIndex]) + m.Labels = append(m.Labels, v1.KeyValue{}) + if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9932,55 +12042,31 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.B = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) + if msglen < 0 { + return ErrInvalidLengthTempo } - m.D = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.D |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTempo } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTempo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + m.Samples = append(m.Samples, Sample{}) + if err := m.Samples[len(m.Samples)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PromLabels", wireType) } - m.Kind = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTempo @@ -9990,11 +12076,24 @@ func (m *TraceQLStatic) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Kind |= int32(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTempo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTempo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PromLabels = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTempo(dAtA[iNdEx:]) diff --git a/pkg/tempopb/tempo.proto b/pkg/tempopb/tempo.proto index ebe7dad66c0..4328f386596 100644 --- a/pkg/tempopb/tempo.proto +++ b/pkg/tempopb/tempo.proto @@ -1,31 +1,34 @@ -syntax="proto3"; +syntax = "proto3"; package tempopb; -import "trace/v1/trace.proto"; import "common/v1/common.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "trace/v1/trace.proto"; service Pusher { - // different versions of PushBytes expect the trace data to be pushed in different formats - rpc PushBytes(PushBytesRequest) returns (PushResponse) {}; // ./pkg/model/v1 - rpc PushBytesV2(PushBytesRequest) returns (PushResponse) {}; // ./pkg/model/v2 + // different versions of PushBytes expect the trace data to be pushed in + // different formats + rpc PushBytes(PushBytesRequest) returns (PushResponse) {} + rpc PushBytesV2(PushBytesRequest) returns (PushResponse) {} } service MetricsGenerator { - rpc PushSpans(PushSpansRequest) returns (PushResponse) {}; - rpc GetMetrics(SpanMetricsRequest) returns (SpanMetricsResponse) {}; + rpc PushSpans(PushSpansRequest) returns (PushResponse) {} + rpc GetMetrics(SpanMetricsRequest) returns (SpanMetricsResponse) {} + rpc QueryRange(QueryRangeRequest) returns (QueryRangeResponse) {} } service Querier { - rpc FindTraceByID(TraceByIDRequest) returns (TraceByIDResponse) {}; - rpc SearchRecent(SearchRequest) returns (SearchResponse) {}; - rpc SearchBlock(SearchBlockRequest) returns (SearchResponse) {}; - rpc SearchTags(SearchTagsRequest) returns (SearchTagsResponse) {}; - rpc SearchTagsV2(SearchTagsRequest) returns (SearchTagsV2Response) {}; - rpc SearchTagValues(SearchTagValuesRequest) returns (SearchTagValuesResponse) {}; - rpc SearchTagValuesV2(SearchTagValuesRequest) returns (SearchTagValuesV2Response) {}; - // rpc SpanMetricsSummary(SpanMetricsSummaryRequest) returns (SpanMetricsSummaryResponse) {}; + rpc FindTraceByID(TraceByIDRequest) returns (TraceByIDResponse) {} + rpc SearchRecent(SearchRequest) returns (SearchResponse) {} + rpc SearchBlock(SearchBlockRequest) returns (SearchResponse) {} + rpc SearchTags(SearchTagsRequest) returns (SearchTagsResponse) {} + rpc SearchTagsV2(SearchTagsRequest) returns (SearchTagsV2Response) {} + rpc SearchTagValues(SearchTagValuesRequest) returns (SearchTagValuesResponse) {} + rpc SearchTagValuesV2(SearchTagValuesRequest) returns (SearchTagValuesV2Response) {} + // rpc SpanMetricsSummary(SpanMetricsSummaryRequest) returns + // (SpanMetricsSummaryResponse) {}; } service StreamingQuerier { @@ -34,6 +37,7 @@ service StreamingQuerier { service Metrics { rpc SpanMetricsSummary(SpanMetricsSummaryRequest) returns (SpanMetricsSummaryResponse) {} + rpc QueryRange(QueryRangeRequest) returns (QueryRangeResponse) {} } // Read @@ -49,8 +53,7 @@ message TraceByIDResponse { TraceByIDMetrics metrics = 2; } -message TraceByIDMetrics { -} +message TraceByIDMetrics {} // SearchRequest takes no block parameters and implies a "recent traces" search message SearchRequest { @@ -66,8 +69,8 @@ message SearchRequest { uint32 SpansPerSpanSet = 9; } -// SearchBlockRequest takes SearchRequest parameters as well as all information necessary -// to search a block in the backend. +// SearchBlockRequest takes SearchRequest parameters as well as all information +// necessary to search a block in the backend. message SearchBlockRequest { SearchRequest searchReq = 1; string blockID = 2; @@ -175,18 +178,27 @@ message Trace { } // Write -message PushResponse { -} +message PushResponse {} -// PushBytesRequest pushes slices of traces, ids and searchdata. Traces are encoded using the +// PushBytesRequest pushes slices of traces, ids and searchdata. Traces are +// encoded using the // current BatchDecoder in ./pkg/model message PushBytesRequest { // pre-marshalled Traces. length must match ids - repeated bytes traces = 2 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; + repeated bytes traces = 2 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "PreallocBytes" + ]; // trace ids. length must match traces - repeated bytes ids = 3 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; + repeated bytes ids = 3 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "PreallocBytes" + ]; // search data, length must match traces - repeated bytes searchData = 4 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; + repeated bytes searchData = 4 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "PreallocBytes" + ]; } message PushSpansRequest { @@ -199,9 +211,10 @@ message TraceBytes { repeated bytes traces = 1; } -// this message exists for marshalling/unmarshalling convenience to/from parquet. in parquet we proto encode -// links to a column. unfortunately you can't encode a slice directly so we use this wrapper to generate -// the required marshalling/unmarshalling functions. +// this message exists for marshalling/unmarshalling convenience to/from +// parquet. in parquet we proto encode links to a column. unfortunately you +// can't encode a slice directly so we use this wrapper to generate the required +// marshalling/unmarshalling functions. message LinkSlice { repeated tempopb.trace.v1.Span.Link links = 1; } @@ -239,6 +252,11 @@ message KeyValue { TraceQLStatic value = 2; } +message RawExemplar { + bytes traceID = 1; // traceID + uint64 val = 2; // duration ns +} + message SpanMetrics { repeated RawHistogram latency_histogram = 1; repeated KeyValue series = 2; @@ -269,3 +287,53 @@ message TraceQLStatic { int32 status = 7; int32 kind = 8; } + +message SpanMetricsData { + string resultType = 1; + repeated SpanMetricsResult result = 2; +} + +message SpanMetricsResult { + string labelName = 1; // if these are empty it is the primary trend + string labelValue = 2; + repeated SpanMetricsResultPoint ts = 3; +} + +message SpanMetricsResultPoint { + uint32 time = 1; + double val = 2; + bytes exemplarTraceID = 3; + uint64 exemplarDuration = 4; +} + +message QueryRangeRequest { + string query = 1; + uint64 start = 2; + uint64 end = 3; + uint64 step = 4; + uint32 shard = 5; + uint32 of = 6; +} + +message QueryRangeResponse { + repeated TimeSeries series = 1; +} + +message Sample { + // Fields order MUST match promql.FPoint so that we can cast types between them. + int64 timestamp_ms = 2; + double value = 1; +} + +// https : // github.com/grafana/mimir/blob/main/pkg/mimirpb/mimir.proto#L53 +message TimeSeries { + // repeated LabelPair labels = 1 [(gogoproto.nullable) = false, + // (gogoproto.customtype) = "LabelAdapter"]; + repeated tempopb.common.v1.KeyValue labels = 1 [(gogoproto.nullable) = false]; + // Sorted by time, oldest sample first. + repeated Sample samples = 2 [(gogoproto.nullable) = false]; + // repeated Exemplar exemplars = 3 [ (gogoproto.nullable) = false ]; + // repeated Histogram histograms = 4 [ (gogoproto.nullable) = false ]; + // TODO: review the LabelAdapter and migrate the use of this string + string prom_labels = 3; +} diff --git a/pkg/traceql/ast.go b/pkg/traceql/ast.go index b1343d67aa9..349e97184c8 100644 --- a/pkg/traceql/ast.go +++ b/pkg/traceql/ast.go @@ -5,6 +5,8 @@ import ( "math" "regexp" "time" + + "github.com/grafana/tempo/pkg/tempopb" ) type Element interface { @@ -12,6 +14,14 @@ type Element interface { validate() error } +type metricsFirstStageElement interface { + Element + extractConditions(request *FetchSpansRequest) + init(*tempopb.QueryRangeRequest) + observe(Span) // TODO - batching? + result() SeriesSet +} + type pipelineElement interface { Element extractConditions(request *FetchSpansRequest) @@ -23,7 +33,8 @@ type typedExpression interface { } type RootExpr struct { - Pipeline Pipeline + Pipeline Pipeline + MetricsPipeline metricsFirstStageElement } func newRootExpr(e pipelineElement) *RootExpr { @@ -37,6 +48,18 @@ func newRootExpr(e pipelineElement) *RootExpr { } } +func newRootExprWithMetrics(e pipelineElement, m metricsFirstStageElement) *RootExpr { + p, ok := e.(Pipeline) + if !ok { + p = newPipeline(e) + } + + return &RootExpr{ + Pipeline: p, + MetricsPipeline: m, + } +} + // ********************** // Pipeline // ********************** @@ -130,12 +153,12 @@ func (o CoalesceOperation) extractConditions(*FetchSpansRequest) { } type SelectOperation struct { - exprs []FieldExpression + attrs []Attribute } -func newSelectOperation(exprs []FieldExpression) SelectOperation { +func newSelectOperation(exprs []Attribute) SelectOperation { return SelectOperation{ - exprs: exprs, + attrs: exprs, } } @@ -718,3 +741,70 @@ var ( _ pipelineElement = (*ScalarFilter)(nil) _ pipelineElement = (*GroupOperation)(nil) ) + +type MetricsAggregate struct { + op MetricsAggregateOp + by []Attribute + agg SpanAggregator +} + +func newMetricsAggregate(agg MetricsAggregateOp, by []Attribute) *MetricsAggregate { + return &MetricsAggregate{ + op: agg, + by: by, + } +} + +func (a *MetricsAggregate) extractConditions(request *FetchSpansRequest) { + switch a.op { + case metricsAggregateRate, metricsAggregateCountOverTime: + // No extra conditions, start time is already enough + } + + selectR := &FetchSpansRequest{} + // copy any conditions to the normal request's SecondPassConditions + for _, b := range a.by { + b.extractConditions(selectR) + } + request.SecondPassConditions = append(request.SecondPassConditions, selectR.Conditions...) +} + +func (a *MetricsAggregate) init(q *tempopb.QueryRangeRequest) { + var innerAgg func() VectorAggregator + + switch a.op { + case metricsAggregateCountOverTime: + innerAgg = func() VectorAggregator { return NewCountOverTimeAggregator() } + case metricsAggregateRate: + innerAgg = func() VectorAggregator { return NewRateAggregator(1.0 / time.Duration(q.Step).Seconds()) } + } + + a.agg = NewGroupingAggregator(a.op.String(), func() RangeAggregator { + return NewStepAggregator(q.Start, q.End, q.Step, innerAgg) + }, a.by) +} + +func (a *MetricsAggregate) observe(span Span) { + a.agg.Observe(span) +} + +func (a *MetricsAggregate) result() SeriesSet { + return a.agg.Series() +} + +func (a *MetricsAggregate) validate() error { + switch a.op { + case metricsAggregateCountOverTime: + case metricsAggregateRate: + default: + return newUnsupportedError(fmt.Sprintf("metrics aggregate operation (%v)", a.op)) + } + + if len(a.by) > maxGroupBys { + return newUnsupportedError(fmt.Sprintf("metrics group by %v values", len(a.by))) + } + + return nil +} + +var _ metricsFirstStageElement = (*MetricsAggregate)(nil) diff --git a/pkg/traceql/ast_conditions.go b/pkg/traceql/ast_conditions.go index d723ae1deed..aa9e0284a97 100644 --- a/pkg/traceql/ast_conditions.go +++ b/pkg/traceql/ast_conditions.go @@ -1,5 +1,12 @@ package traceql +func (r RootExpr) extractConditions(request *FetchSpansRequest) { + r.Pipeline.extractConditions(request) + if r.MetricsPipeline != nil { + r.MetricsPipeline.extractConditions(request) + } +} + func (f SpansetFilter) extractConditions(request *FetchSpansRequest) { f.Expression.extractConditions(request) @@ -24,7 +31,7 @@ func (f SpansetFilter) extractConditions(request *FetchSpansRequest) { // extractConditions on Select puts its conditions into the SecondPassConditions func (o SelectOperation) extractConditions(request *FetchSpansRequest) { selectR := &FetchSpansRequest{} - for _, expr := range o.exprs { + for _, expr := range o.attrs { expr.extractConditions(selectR) } // copy any conditions to the normal request's SecondPassConditions diff --git a/pkg/traceql/ast_stringer.go b/pkg/traceql/ast_stringer.go index d908594c2ca..194654890ea 100644 --- a/pkg/traceql/ast_stringer.go +++ b/pkg/traceql/ast_stringer.go @@ -27,8 +27,8 @@ func (o CoalesceOperation) String() string { } func (o SelectOperation) String() string { - s := make([]string, 0, len(o.exprs)) - for _, e := range o.exprs { + s := make([]string, 0, len(o.attrs)) + for _, e := range o.attrs { s = append(s, e.String()) } return "select(" + strings.Join(s, ", ") + ")" @@ -118,13 +118,17 @@ func (a Attribute) String() string { } // Top-level attributes get a "." but top-level intrinsics don't - if scope == "" && a.Intrinsic == IntrinsicNone { + if scope == "" && a.Intrinsic == IntrinsicNone && len(att) > 0 { scope += "." } return scope + att } +func (a MetricsAggregate) String() string { + return a.op.String() +} + func binaryOp(op Operator, lhs Element, rhs Element) string { return wrapElement(lhs) + " " + op.String() + " " + wrapElement(rhs) } diff --git a/pkg/traceql/ast_validate.go b/pkg/traceql/ast_validate.go index aeb9d4eff8a..c5ea45a3285 100644 --- a/pkg/traceql/ast_validate.go +++ b/pkg/traceql/ast_validate.go @@ -19,7 +19,16 @@ func (e *unsupportedError) Error() string { } func (r RootExpr) validate() error { - return r.Pipeline.validate() + err := r.Pipeline.validate() + if err != nil { + return err + } + + if r.MetricsPipeline != nil { + return r.MetricsPipeline.validate() + } + + return nil } func (p Pipeline) validate() error { @@ -46,7 +55,7 @@ func (o CoalesceOperation) validate() error { } func (o SelectOperation) validate() error { - for _, e := range o.exprs { + for _, e := range o.attrs { if err := e.validate(); err != nil { return err } diff --git a/pkg/traceql/combine.go b/pkg/traceql/combine.go index 60ea04fd5f6..85ffa36193b 100644 --- a/pkg/traceql/combine.go +++ b/pkg/traceql/combine.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/grafana/tempo/pkg/tempopb" + "golang.org/x/exp/maps" ) type MetadataCombiner struct { @@ -119,3 +120,46 @@ func spansetID(ss *tempopb.SpanSet) string { return id } + +type QueryRangeCombiner struct { + ts map[string]*tempopb.TimeSeries +} + +func (q *QueryRangeCombiner) Combine(set []*tempopb.TimeSeries) { + if len(set) == 0 { + return + } + + if q.ts == nil { + q.ts = make(map[string]*tempopb.TimeSeries, len(set)) + } + + for _, series := range set { + + existing, ok := q.ts[series.PromLabels] + if !ok { + q.ts[series.PromLabels] = series + continue + } + + q.combine(series, existing) + } +} + +func (QueryRangeCombiner) combine(in *tempopb.TimeSeries, out *tempopb.TimeSeries) { +outer: + for _, sample := range in.Samples { + for i, existing := range out.Samples { + if sample.TimestampMs == existing.TimestampMs { + out.Samples[i].Value += sample.Value + continue outer + } + } + + out.Samples = append(out.Samples, sample) + } +} + +func (q *QueryRangeCombiner) Results() []*tempopb.TimeSeries { + return maps.Values(q.ts) +} diff --git a/pkg/traceql/engine.go b/pkg/traceql/engine.go index db476e96ae1..7686470f585 100644 --- a/pkg/traceql/engine.go +++ b/pkg/traceql/engine.go @@ -24,18 +24,23 @@ func NewEngine() *Engine { return &Engine{} } -func (e *Engine) Compile(query string) (func(input []*Spanset) (result []*Spanset, err error), *FetchSpansRequest, error) { +func (e *Engine) Compile(query string) (func(input []*Spanset) (result []*Spanset, err error), metricsFirstStageElement, *FetchSpansRequest, error) { expr, err := Parse(query) if err != nil { - return nil, nil, err + return nil, nil, nil, err } req := &FetchSpansRequest{ AllConditions: true, } - expr.Pipeline.extractConditions(req) + expr.extractConditions(req) - return expr.Pipeline.evaluate, req, nil + err = expr.validate() + if err != nil { + return nil, nil, nil, err + } + + return expr.Pipeline.evaluate, expr.MetricsPipeline, req, nil } func (e *Engine) ExecuteSearch(ctx context.Context, searchReq *tempopb.SearchRequest, spanSetFetcher SpansetFetcher) (*tempopb.SearchResponse, error) { @@ -252,7 +257,7 @@ func (e *Engine) asTraceSearchMetadata(spanset *Spanset) *tempopb.TraceSearchMet continue } - staticAnyValue := static.asAnyValue() + staticAnyValue := static.AsAnyValue() keyValue := &common_v1.KeyValue{ Key: attribute.Name, @@ -279,7 +284,7 @@ func (e *Engine) asTraceSearchMetadata(spanset *Spanset) *tempopb.TraceSearchMet continue } - staticAnyValue := att.Val.asAnyValue() + staticAnyValue := att.Val.AsAnyValue() keyValue := &common_v1.KeyValue{ Key: att.Name, Value: staticAnyValue, @@ -294,7 +299,7 @@ func unixSecToNano(ts uint32) uint64 { return uint64(ts) * uint64(time.Second/time.Nanosecond) } -func (s Static) asAnyValue() *common_v1.AnyValue { +func (s Static) AsAnyValue() *common_v1.AnyValue { switch s.Type { case TypeInt: return &common_v1.AnyValue{ diff --git a/pkg/traceql/engine_metrics.go b/pkg/traceql/engine_metrics.go new file mode 100644 index 00000000000..b35298d0827 --- /dev/null +++ b/pkg/traceql/engine_metrics.go @@ -0,0 +1,608 @@ +package traceql + +import ( + "context" + "encoding/binary" + "errors" + "fmt" + "hash" + "hash/fnv" + "sync" + "time" + + "github.com/prometheus/prometheus/model/labels" + + "github.com/grafana/tempo/pkg/tempopb" + "github.com/grafana/tempo/pkg/util" +) + +func DefaultQueryRangeStep(start, end uint64) uint64 { + + delta := time.Duration(end - start) + + // Try to get this many data points + // Our baseline is is 1 hour @ 15s intervals + baseline := delta / 240 + + // Round down in intervals of 5s + interval := baseline / (5 * time.Second) * (5 * time.Second) + + if interval < 5*time.Second { + // Round down in intervals of 1s + interval = baseline / time.Second * time.Second + } + + if interval < time.Second { + return uint64(time.Second.Nanoseconds()) + } + + return uint64(interval.Nanoseconds()) +} + +// IntervalCount is the number of intervals in the range with step. +func IntervalCount(start, end, step uint64) int { + intervals := (end - start) / step + intervals++ + return int(intervals) +} + +// TimestampOf the given interval with the start and step. +func TimestampOf(interval, start, step uint64) uint64 { + return start + interval*step +} + +// IntervalOf the given timestamp within the range and step. +func IntervalOf(ts, start, end, step uint64) int { + if ts < start || ts > end || end == start || step == 0 { + // Invalid + return -1 + } + + return int((ts - start) / step) +} + +const maxGroupBys = 5 // TODO - Delete me +type FastValues [maxGroupBys]Static + +type TimeSeries struct { + //Labels LabelSet + Labels labels.Labels + Values []float64 +} + +// TODO - Make an analog of me in tempopb proto for over-the-wire transmission +type SeriesSet map[string]TimeSeries + +// VectorAggregator turns a vector of spans into a single numeric scalar +type VectorAggregator interface { + Observe(s Span) + Sample() float64 +} + +// RangeAggregator sorts spans into time slots +// TODO - for efficiency we probably combine this with VectorAggregator (see todo about CountOverTimeAggregator) +type RangeAggregator interface { + Observe(s Span) + Samples() []float64 +} + +// SpanAggregator sorts spans into series +type SpanAggregator interface { + Observe(Span) + Series() SeriesSet +} + +// CountOverTimeAggregator counts the number of spans. It can also +// calculate the rate when given a multiplier. +// TODO - Rewrite me to be []float64 which is more efficient +type CountOverTimeAggregator struct { + count float64 + rateMult float64 +} + +var _ VectorAggregator = (*CountOverTimeAggregator)(nil) + +func NewCountOverTimeAggregator() *CountOverTimeAggregator { + return &CountOverTimeAggregator{ + rateMult: 1.0, + } +} + +func NewRateAggregator(rateMult float64) *CountOverTimeAggregator { + return &CountOverTimeAggregator{ + rateMult: rateMult, + } +} + +func (c *CountOverTimeAggregator) Observe(_ Span) { + c.count++ +} + +func (c *CountOverTimeAggregator) Sample() float64 { + return c.count * c.rateMult +} + +// StepAggregator sorts spans into time slots using a step interval like 30s or 1m +type StepAggregator struct { + start uint64 + end uint64 + step uint64 + vectors []VectorAggregator +} + +var _ RangeAggregator = (*StepAggregator)(nil) + +func NewStepAggregator(start, end, step uint64, innerAgg func() VectorAggregator) *StepAggregator { + intervals := IntervalCount(start, end, step) + vectors := make([]VectorAggregator, intervals) + for i := range vectors { + vectors[i] = innerAgg() + } + + return &StepAggregator{ + start: start, + end: end, + step: step, + vectors: vectors, + } +} + +func (s *StepAggregator) Observe(span Span) { + interval := IntervalOf(span.StartTimeUnixNanos(), s.start, s.end, s.step) + if interval == -1 { + return + } + s.vectors[interval].Observe(span) +} + +func (s *StepAggregator) Samples() []float64 { + ss := make([]float64, len(s.vectors)) + for i, v := range s.vectors { + ss[i] = v.Sample() + } + return ss +} + +type GroupingAggregator struct { + // Config + by []Attribute // Original attributes: .foo + byLookups [][]Attribute // Lookups: span.foo resource.foo + innerAgg func() RangeAggregator + + // Data + series map[FastValues]RangeAggregator + buf FastValues +} + +var _ SpanAggregator = (*GroupingAggregator)(nil) + +func NewGroupingAggregator(aggName string, innerAgg func() RangeAggregator, by []Attribute) SpanAggregator { + if len(by) == 0 { + return &UngroupedAggregator{ + name: aggName, + innerAgg: innerAgg(), + } + } + + lookups := make([][]Attribute, len(by)) + for i, attr := range by { + if attr.Intrinsic == IntrinsicNone && attr.Scope == AttributeScopeNone { + // Unscoped attribute. Check span-level, then resource-level. + lookups[i] = []Attribute{ + NewScopedAttribute(AttributeScopeSpan, false, attr.Name), + NewScopedAttribute(AttributeScopeResource, false, attr.Name), + } + } else { + lookups[i] = []Attribute{attr} + } + } + + return &GroupingAggregator{ + series: map[FastValues]RangeAggregator{}, + by: by, + byLookups: lookups, + innerAgg: innerAgg, + } +} + +func (g *GroupingAggregator) Observe(span Span) { + + // Get grouping values + for i, lookups := range g.byLookups { + g.buf[i] = lookup(lookups, span) + } + + agg, ok := g.series[g.buf] + if !ok { + agg = g.innerAgg() + g.series[g.buf] = agg + } + + agg.Observe(span) +} + +// labelsFor gives the final labels for the series. Slower and can't be on the hot path. +// This is tweaked to match what prometheus does. For grouped metrics we don't +// include the metric name, just the group labels. +// rate() by (x) => {x=a}, {x=b}, ... +func (g *GroupingAggregator) labelsFor(vals FastValues) labels.Labels { + b := labels.NewBuilder(nil) + + any := false + for i, v := range vals { + if v.Type != TypeNil { + b.Set(g.by[i].String(), v.EncodeToString(false)) + any = true + } + } + + if !any { + // Force at least 1 label or else this series is displayed weird + b.Set(g.by[0].String(), "") + } + + return b.Labels() +} + +func (g *GroupingAggregator) Series() SeriesSet { + ss := SeriesSet{} + + for vals, agg := range g.series { + l := g.labelsFor(vals) + + ss[l.String()] = TimeSeries{ + Labels: l, + Values: agg.Samples(), + } + } + + return ss +} + +// UngroupedAggregator builds a single series with no labels. e.g. {} | rate() +type UngroupedAggregator struct { + name string + innerAgg RangeAggregator +} + +var _ SpanAggregator = (*UngroupedAggregator)(nil) + +func (u *UngroupedAggregator) Observe(span Span) { + u.innerAgg.Observe(span) +} + +// Series output. +// This is tweaked to match what prometheus does. For ungrouped metrics we +// fill in a placeholder metric name with the name of the aggregation. +// rate() => {__name__=rate} +func (u *UngroupedAggregator) Series() SeriesSet { + l := labels.FromStrings(labels.MetricName, u.name) + return SeriesSet{ + l.String(): { + Labels: l, + Values: u.innerAgg.Samples(), + }, + } +} + +// ExecuteMetricsQueryRange - Execute the given metrics query. Just a wrapper around CompileMetricsQueryRange +func (e *Engine) ExecuteMetricsQueryRange(ctx context.Context, req *tempopb.QueryRangeRequest, fetcher SpansetFetcher) (results SeriesSet, err error) { + eval, err := e.CompileMetricsQueryRange(req, false) + if err != nil { + return nil, err + } + + err = eval.Do(ctx, fetcher) + if err != nil { + return nil, err + } + + return eval.Results() +} + +// CompileMetricsQueryRange returns an evalulator that can be reused across multiple data sources. +func (e *Engine) CompileMetricsQueryRange(req *tempopb.QueryRangeRequest, dedupeSpans bool) (*MetricsEvalulator, error) { + if req.Start <= 0 { + return nil, fmt.Errorf("start required") + } + if req.End <= 0 { + return nil, fmt.Errorf("end required") + } + if req.End <= req.Start { + return nil, fmt.Errorf("end must be greater than start") + } + if req.Step <= 0 { + return nil, fmt.Errorf("step required") + } + + eval, metricsPipeline, storageReq, err := e.Compile(req.Query) + if err != nil { + return nil, fmt.Errorf("compiling query: %w", err) + } + + if metricsPipeline == nil { + return nil, fmt.Errorf("not a metrics query") + } + + // This initializes all step buffers, counters, etc + metricsPipeline.init(req) + + me := &MetricsEvalulator{ + storageReq: storageReq, + metricsPipeline: metricsPipeline, + dedupeSpans: dedupeSpans, + } + + if req.Of > 1 { + // Trace id sharding + // Select traceID if not already present. It must be in the first pass + // so that we only evalulate our traces. + storageReq.Shard = int(req.Shard) + storageReq.Of = int(req.Of) + traceID := NewIntrinsic(IntrinsicTraceID) + if !storageReq.HasAttribute(traceID) { + storageReq.Conditions = append(storageReq.Conditions, Condition{Attribute: traceID}) + } + } + + // Sharding algorithm + // In order to scale out queries like {A} >> {B} | rate() we need specific + // rules about the data is divided across time boundary shards. These + // spans can cross hours or days and the simple idea to just check span + // start time won't work. + // Therefore results are matched with the following rules: + // (1) Evalulate the query for any overlapping trace + // (2) For any matching spans: only include the ones that started in this time frame. + // This will increase redundant trace evalulation, but it ensures that matching spans are + // gauranteed to be found and included in the metrcs. + startTime := NewIntrinsic(IntrinsicSpanStartTime) + if !storageReq.HasAttribute(startTime) { + if storageReq.AllConditions { + // The most efficient case. We can add it to the primary pass + // without affecting correctness. And this lets us avoid the + // entire second pass. + storageReq.Conditions = append(storageReq.Conditions, Condition{Attribute: startTime}) + } else { + // Complex query with a second pass. In this case it is better to + // add it to the second pass so that it's only returned for the matches. + storageReq.SecondPassConditions = append(storageReq.SecondPassConditions, Condition{Attribute: startTime}) + } + } + + // Special optimization for queries like {} | rate() by (rootName) + // If first pass is only StartTime, then move any intrinsics to the first + // pass and try to avoid a second pass. It's ok and beneficial to move + // intrinsics because they exist for every span and are never nil. + // But we can't move attributes because that changes the handling of nils. + // Moving attributes to the first pass is like asserting non-nil on them. + // TODO + + if dedupeSpans { + // We dedupe based on trace ID and start time. Obviously this doesn't + // work if 2 spans have the same start time, but this doesn't impose any + // more data on the query when sharding is already present above (most cases) + traceID := NewIntrinsic(IntrinsicTraceID) + if !storageReq.HasAttribute(traceID) { + storageReq.Conditions = append(storageReq.Conditions, Condition{Attribute: traceID}) + } + } + + // (1) any overlapping trace + // TODO - Make this dynamic since it can be faster to skip + // the trace-level timestamp check when all or most of the traces + // overlap the window. + //storageReq.StartTimeUnixNanos = req.Start + //storageReq.EndTimeUnixNanos = req.End // Should this be exclusive? + // (2) Only include spans that started in this time frame. + // This is checked inside the evaluator + me.checkTime = true + me.start = req.Start + me.end = req.End + + // Avoid a second pass when not needed for much better performance. + // TODO - Is there any case where eval() needs to be called but AllConditions=true? + if !storageReq.AllConditions || len(storageReq.SecondPassConditions) > 0 { + storageReq.SecondPass = func(s *Spanset) ([]*Spanset, error) { + return eval([]*Spanset{s}) + } + } + + return me, nil +} + +func lookup(needles []Attribute, haystack Span) Static { + for _, n := range needles { + if v, ok := haystack.AttributeFor(n); ok { + return v + } + } + + return Static{} +} + +type MetricsEvalulator struct { + start, end uint64 + checkTime bool + dedupeSpans bool + //deduper *SpanBloomDeduper + deduper *SpanDeduper2 + storageReq *FetchSpansRequest + metricsPipeline metricsFirstStageElement + count int + deduped int + mtx sync.Mutex +} + +func (e *MetricsEvalulator) Do(ctx context.Context, f SpansetFetcher) error { + fetch, err := f.Fetch(ctx, *e.storageReq) + if errors.Is(err, util.ErrUnsupported) { + return nil + } + if err != nil { + return err + } + + if e.dedupeSpans && e.deduper == nil { + e.deduper = NewSpanDeduper2() + //e.deduper = NewSpanBloomDeduper() + } + + defer fetch.Results.Close() + + for { + ss, err := fetch.Results.Next(ctx) + if err != nil { + return err + } + if ss == nil { + break + } + + for _, s := range ss.Spans { + if e.checkTime { + st := s.StartTimeUnixNanos() + if st < e.start || st >= e.end { + continue + } + } + + e.mtx.Lock() + if e.dedupeSpans && e.deduper.Skip(ss.TraceID, s.StartTimeUnixNanos()) { + e.deduped++ + e.mtx.Unlock() + continue + } + + e.count++ + e.metricsPipeline.observe(s) + e.mtx.Unlock() + } + + ss.Release() + } + + return nil +} + +func (e *MetricsEvalulator) SpanCount() { + fmt.Println(e.count, e.deduped) +} + +func (e *MetricsEvalulator) Results() (SeriesSet, error) { + return e.metricsPipeline.result(), nil +} + +// SpanDeduper using sharded maps in-memory. So far this is the most +// performant. We are effectively only using the bottom 5 bytes of +// every span ID. Byte [3] is used to select a sharded map and the +// next 4 are the uint32 within that map. Is this good enough? Maybe... let's find out! +/*type SpanDeduper struct { + m []map[uint32]struct{} +} + +func NewSpanDeduper() *SpanDeduper { + maps := make([]map[uint32]struct{}, 256) + for i := range maps { + maps[i] = make(map[uint32]struct{}, 1000) + } + return &SpanDeduper{ + m: maps, + } +} + +func (d *SpanDeduper) Skip(id []byte) bool { + if len(id) != 8 { + return false + } + + m := d.m[id[3]] + v := binary.BigEndian.Uint32(id[4:8]) + + if _, ok := m[v]; ok { + return true + } + + m[v] = struct{}{} + return false +}*/ + +/* +// This dedupes span IDs using a chain of bloom filters. I thought it +// was going to be awesome but it is WAY TOO SLOW +type SpanBloomDeduper struct { + blooms []*bloom.BloomFilter + count int +} + +func NewSpanBloomDeduper() *SpanBloomDeduper { + //first := bloom.NewWithEstimates(1_000_000, 0.001) + first := bloom.New(999499917, 1) + + return &SpanBloomDeduper{ + blooms: []*bloom.BloomFilter{first}, + } +} + +func (d *SpanBloomDeduper) Skip(id []byte) bool { + + for _, b := range d.blooms { + if b.Test(id) { + return true + } + } + + d.count++ + if d.count%1_000_000 == 0 { + // Time for another filter + //d.blooms = append(d.blooms, bloom.NewWithEstimates(1_000_000, 0.001)) + d.blooms = append(d.blooms, bloom.New(999499917, 1)) + } + + // Set in latest filter + d.blooms[len(d.blooms)-1].Add(id) + + return false +}*/ + +// SpanDeduper2 is EXTREMELY LAZY. It attempts to dedupe spans for metrics +// without requiring any new data fields. It uses trace ID and span start time +// which are already loaded. This of course terrible, but did I mention that +// this is extremely lazy? Additionally it uses sharded maps by the lowest byte +// of the trace ID to reduce the pressure on any single map. Maybe it's good enough. Let's find out! +type SpanDeduper2 struct { + m []map[uint32]struct{} + h hash.Hash32 + buf []byte + traceID Attribute +} + +func NewSpanDeduper2() *SpanDeduper2 { + maps := make([]map[uint32]struct{}, 256) + for i := range maps { + maps[i] = make(map[uint32]struct{}, 1000) + } + return &SpanDeduper2{ + m: maps, + h: fnv.New32a(), + buf: make([]byte, 8), + traceID: NewIntrinsic(IntrinsicTraceID), + } +} + +func (d *SpanDeduper2) Skip(tid []byte, startTime uint64) bool { + + d.h.Reset() + d.h.Write([]byte(tid)) + binary.BigEndian.PutUint64(d.buf, startTime) + d.h.Write(d.buf) + + v := d.h.Sum32() + m := d.m[tid[len(tid)-1]] + + if _, ok := m[v]; ok { + return true + } + + m[v] = struct{}{} + return false +} diff --git a/pkg/traceql/engine_metrics_test.go b/pkg/traceql/engine_metrics_test.go new file mode 100644 index 00000000000..82a010d7b3c --- /dev/null +++ b/pkg/traceql/engine_metrics_test.go @@ -0,0 +1,156 @@ +package traceql + +import ( + "fmt" + "testing" + "time" + + "github.com/grafana/tempo/pkg/tempopb" + "github.com/stretchr/testify/require" +) + +func TestDefaultQueryRangeStep(t *testing.T) { + tc := []struct { + start, end time.Time + expected time.Duration + }{ + {time.Unix(0, 0), time.Unix(100, 0), time.Second}, + {time.Unix(0, 0), time.Unix(600, 0), 5 * time.Second}, + {time.Unix(0, 0), time.Unix(3600, 0), 30 * time.Second}, + } + + for _, c := range tc { + require.Equal(t, c.expected, time.Duration(DefaultQueryRangeStep(uint64(c.start.UnixNano()), uint64(c.end.UnixNano())))) + } +} + +func TestStepRangeToIntervals(t *testing.T) { + tc := []struct { + start, end, step uint64 + expected int + }{ + { + start: 0, + end: 1, + step: 1, + expected: 2, // 0, 1, even multiple + }, + { + start: 0, + end: 10, + step: 3, + expected: 4, // 0, 3, 6, 9 + }, + } + + for _, c := range tc { + require.Equal(t, c.expected, IntervalCount(c.start, c.end, c.step)) + } +} + +func TestTimestampOf(t *testing.T) { + tc := []struct { + interval, start, step uint64 + expected uint64 + }{ + { + expected: 0, + }, + { + interval: 2, + start: 10, + step: 3, + expected: 16, + }, + } + + for _, c := range tc { + require.Equal(t, c.expected, TimestampOf(c.interval, c.start, c.step)) + } +} + +func TestIntervalOf(t *testing.T) { + tc := []struct { + ts, start, end, step uint64 + expected int + }{ + {expected: -1}, + { + ts: 0, + end: 1, + step: 1, + }, + { + ts: 10, + end: 10, + step: 1, + expected: 10, + }, + } + + for _, c := range tc { + require.Equal(t, c.expected, IntervalOf(c.ts, c.start, c.end, c.step)) + } +} + +func TestCompileMetricsQueryRange(t *testing.T) { + tc := map[string]struct { + q string + start, end uint64 + step uint64 + expectedErr error + }{ + "start": { + expectedErr: fmt.Errorf("start required"), + }, + "end": { + start: 1, + expectedErr: fmt.Errorf("end required"), + }, + "range": { + start: 2, + end: 1, + expectedErr: fmt.Errorf("end must be greater than start"), + }, + "step": { + start: 1, + end: 2, + expectedErr: fmt.Errorf("step required"), + }, + "notmetrics": { + start: 1, + end: 2, + step: 3, + q: "{}", + expectedErr: fmt.Errorf("not a metrics query"), + }, + "notsupported": { + start: 1, + end: 2, + step: 3, + q: "{} | rate() by (.a,.b,.c,.d,.e,.f)", + expectedErr: fmt.Errorf("compiling query: metrics group by 6 values not yet supported"), + }, + "ok": { + start: 1, + end: 2, + step: 3, + q: "{} | rate()", + }, + } + + for n, c := range tc { + t.Run(n, func(t *testing.T) { + _, err := NewEngine().CompileMetricsQueryRange(&tempopb.QueryRangeRequest{ + Query: c.q, + Start: c.start, + End: c.end, + Step: c.step, + }, false) + + if c.expectedErr != nil { + require.EqualError(t, err, c.expectedErr.Error()) + } + }) + } +} diff --git a/pkg/traceql/engine_test.go b/pkg/traceql/engine_test.go index afd9ce54f7a..38f6cf01771 100644 --- a/pkg/traceql/engine_test.go +++ b/pkg/traceql/engine_test.go @@ -460,7 +460,7 @@ func TestStatic_AsAnyValue(t *testing.T) { } for _, tc := range tt { t.Run(fmt.Sprintf("%v", tc.s), func(t *testing.T) { - assert.Equal(t, tc.expected, tc.s.asAnyValue()) + assert.Equal(t, tc.expected, tc.s.AsAnyValue()) }) } } diff --git a/pkg/traceql/enum_aggregates.go b/pkg/traceql/enum_aggregates.go index aca01289db1..82fde999cbe 100644 --- a/pkg/traceql/enum_aggregates.go +++ b/pkg/traceql/enum_aggregates.go @@ -28,3 +28,21 @@ func (a AggregateOp) String() string { return fmt.Sprintf("aggregate(%d)", a) } + +type MetricsAggregateOp int + +const ( + metricsAggregateRate MetricsAggregateOp = iota + metricsAggregateCountOverTime +) + +func (a MetricsAggregateOp) String() string { + switch a { + case metricsAggregateRate: + return "rate" + case metricsAggregateCountOverTime: + return "count_over_time" + } + + return fmt.Sprintf("aggregate(%d)", a) +} diff --git a/pkg/traceql/expr.y b/pkg/traceql/expr.y index 6d2030cb4e7..8cdffb6752b 100644 --- a/pkg/traceql/expr.y +++ b/pkg/traceql/expr.y @@ -13,7 +13,7 @@ import ( groupOperation GroupOperation coalesceOperation CoalesceOperation selectOperation SelectOperation - selectArgs []FieldExpression + attributeList []Attribute spansetExpression SpansetExpression spansetPipelineExpression SpansetExpression @@ -29,6 +29,7 @@ import ( wrappedScalarPipeline Pipeline scalarPipeline Pipeline aggregate Aggregate + metricsAggregation *MetricsAggregate fieldExpression FieldExpression static Static @@ -46,7 +47,7 @@ import ( %type groupOperation %type coalesceOperation %type selectOperation -%type selectArgs +%type attributeList %type spansetExpression %type spansetPipelineExpression @@ -55,6 +56,7 @@ import ( %type spansetFilter %type scalarFilter %type scalarFilterOperation +%type metricsAggregation %type scalarPipelineExpressionFilter %type scalarPipelineExpression @@ -80,6 +82,7 @@ import ( COUNT AVG MAX MIN SUM BY COALESCE SELECT END_ATTRIBUTE + RATE COUNT_OVER_TIME // Operators are listed with increasing precedence. %left PIPE @@ -97,7 +100,8 @@ import ( root: spansetPipeline { yylex.(*lexer).expr = newRootExpr($1) } | spansetPipelineExpression { yylex.(*lexer).expr = newRootExpr($1) } - | scalarPipelineExpressionFilter { yylex.(*lexer).expr = newRootExpr($1) } + | scalarPipelineExpressionFilter { yylex.(*lexer).expr = newRootExpr($1) } + | spansetPipeline PIPE metricsAggregation { yylex.(*lexer).expr = newRootExprWithMetrics($1, $3) } ; // ********************** @@ -144,12 +148,14 @@ coalesceOperation: ; selectOperation: - SELECT OPEN_PARENS selectArgs CLOSE_PARENS { $$ = newSelectOperation($3) } + SELECT OPEN_PARENS attributeList CLOSE_PARENS { $$ = newSelectOperation($3) } ; -selectArgs: - fieldExpression { $$ = []FieldExpression{$1} } - | selectArgs COMMA fieldExpression { $$ = append($1, $3) } +attributeList: + intrinsicField { $$ = []Attribute{$1} } + | attributeField { $$ = []Attribute{$1} } + | attributeList COMMA intrinsicField { $$ = append($1, $3) } + | attributeList COMMA attributeField { $$ = append($1, $3) } ; spansetExpression: // shares the same operators as scalarPipelineExpression. split out for readability @@ -241,6 +247,16 @@ aggregate: | SUM OPEN_PARENS fieldExpression CLOSE_PARENS { $$ = newAggregate(aggregateSum, $3) } ; +// ********************** +// Metrics +// ********************** +metricsAggregation: + RATE OPEN_PARENS CLOSE_PARENS { $$ = newMetricsAggregate(metricsAggregateRate, nil) } + | COUNT_OVER_TIME OPEN_PARENS CLOSE_PARENS { $$ = newMetricsAggregate(metricsAggregateCountOverTime, nil) } + | RATE OPEN_PARENS CLOSE_PARENS BY OPEN_PARENS attributeList CLOSE_PARENS { $$ = newMetricsAggregate(metricsAggregateRate, $6) } + | COUNT_OVER_TIME OPEN_PARENS CLOSE_PARENS BY OPEN_PARENS attributeList CLOSE_PARENS { $$ = newMetricsAggregate(metricsAggregateCountOverTime, $6) } + ; + // ********************** // FieldExpressions // ********************** diff --git a/pkg/traceql/expr.y.go b/pkg/traceql/expr.y.go index e44069347db..bcbe570cb14 100644 --- a/pkg/traceql/expr.y.go +++ b/pkg/traceql/expr.y.go @@ -18,7 +18,7 @@ type yySymType struct { groupOperation GroupOperation coalesceOperation CoalesceOperation selectOperation SelectOperation - selectArgs []FieldExpression + attributeList []Attribute spansetExpression SpansetExpression spansetPipelineExpression SpansetExpression @@ -34,6 +34,7 @@ type yySymType struct { wrappedScalarPipeline Pipeline scalarPipeline Pipeline aggregate Aggregate + metricsAggregation *MetricsAggregate fieldExpression FieldExpression static Static @@ -92,31 +93,33 @@ const BY = 57387 const COALESCE = 57388 const SELECT = 57389 const END_ATTRIBUTE = 57390 -const PIPE = 57391 -const AND = 57392 -const OR = 57393 -const EQ = 57394 -const NEQ = 57395 -const LT = 57396 -const LTE = 57397 -const GT = 57398 -const GTE = 57399 -const NRE = 57400 -const RE = 57401 -const DESC = 57402 -const ANCE = 57403 -const SIBL = 57404 -const NOT_CHILD = 57405 -const NOT_PARENT = 57406 -const NOT_DESC = 57407 -const NOT_ANCE = 57408 -const ADD = 57409 -const SUB = 57410 -const NOT = 57411 -const MUL = 57412 -const DIV = 57413 -const MOD = 57414 -const POW = 57415 +const RATE = 57391 +const COUNT_OVER_TIME = 57392 +const PIPE = 57393 +const AND = 57394 +const OR = 57395 +const EQ = 57396 +const NEQ = 57397 +const LT = 57398 +const LTE = 57399 +const GT = 57400 +const GTE = 57401 +const NRE = 57402 +const RE = 57403 +const DESC = 57404 +const ANCE = 57405 +const SIBL = 57406 +const NOT_CHILD = 57407 +const NOT_PARENT = 57408 +const NOT_DESC = 57409 +const NOT_ANCE = 57410 +const ADD = 57411 +const SUB = 57412 +const NOT = 57413 +const MUL = 57414 +const DIV = 57415 +const MOD = 57416 +const POW = 57417 var yyToknames = [...]string{ "$end", @@ -167,6 +170,8 @@ var yyToknames = [...]string{ "COALESCE", "SELECT", "END_ATTRIBUTE", + "RATE", + "COUNT_OVER_TIME", "PIPE", "AND", "OR", @@ -204,222 +209,228 @@ var yyExca = [...]int{ -1, 1, 1, -1, -2, 0, - -1, 223, - 13, 67, - -2, 75, + -1, 229, + 13, 70, + -2, 78, } const yyPrivate = 57344 -const yyLast = 752 +const yyLast = 756 var yyAct = [...]int{ - 82, 5, 221, 2, 6, 8, 7, 18, 201, 78, - 65, 55, 54, 162, 86, 28, 188, 189, 255, 190, - 191, 192, 201, 190, 191, 192, 201, 13, 259, 258, - 127, 161, 249, 128, 131, 129, 248, 58, 75, 76, - 77, 78, 247, 147, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 202, 203, 193, 194, 195, - 196, 197, 198, 200, 199, 73, 74, 28, 75, 76, - 77, 78, 188, 189, 168, 190, 191, 192, 201, 246, - 184, 186, 227, 228, 204, 205, 206, 62, 63, 64, - 65, 256, 66, 67, 68, 69, 70, 71, 254, 213, - 176, 178, 179, 180, 181, 182, 183, 73, 74, 165, - 75, 76, 77, 78, 60, 61, 220, 62, 63, 64, - 65, 169, 88, 161, 214, 215, 216, 217, 210, 17, - 135, 148, 126, 125, 218, 202, 203, 193, 194, 195, - 196, 197, 198, 200, 199, 19, 20, 21, 124, 17, - 218, 132, 188, 189, 123, 190, 191, 192, 201, 162, - 219, 122, 211, 212, 127, 80, 79, 128, 131, 129, - 223, 87, 225, 119, 120, 121, 253, 251, 57, 23, - 26, 24, 25, 27, 14, 133, 15, 166, 250, 229, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 219, 209, 22, 208, 207, - 16, 72, 4, 202, 203, 193, 194, 195, 196, 197, - 198, 200, 199, 59, 55, 12, 55, 225, 10, 257, - 188, 189, 185, 190, 191, 192, 201, 164, 56, 11, - 130, 73, 74, 1, 75, 76, 77, 78, 0, 0, - 58, 0, 58, 89, 90, 91, 95, 115, 0, 81, - 83, 0, 0, 94, 92, 93, 97, 96, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 111, 110, 112, 113, 114, 118, 116, 117, 0, 0, - 0, 60, 61, 0, 62, 63, 64, 65, 167, 170, - 171, 172, 173, 174, 175, 0, 252, 0, 89, 90, - 91, 95, 115, 0, 0, 83, 84, 85, 94, 92, - 93, 97, 96, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 111, 110, 112, 113, 114, - 118, 116, 117, 202, 203, 193, 194, 195, 196, 197, - 198, 200, 199, 245, 0, 0, 0, 0, 0, 0, - 188, 189, 0, 190, 191, 192, 201, 19, 20, 21, - 0, 84, 85, 177, 43, 0, 42, 226, 50, 0, - 44, 45, 47, 48, 49, 52, 51, 0, 0, 0, - 202, 203, 193, 194, 195, 196, 197, 198, 200, 199, - 187, 23, 26, 24, 25, 27, 0, 188, 189, 0, - 190, 191, 192, 201, 202, 203, 193, 194, 195, 196, - 197, 198, 200, 199, 0, 0, 0, 0, 0, 22, - 0, 188, 189, 0, 190, 191, 192, 201, 0, 202, - 203, 193, 194, 195, 196, 197, 198, 200, 199, 0, - 0, 0, 0, 0, 0, 0, 188, 189, 0, 190, - 191, 192, 201, 202, 203, 193, 194, 195, 196, 197, - 198, 200, 199, 166, 0, 0, 0, 0, 0, 0, - 188, 189, 0, 190, 191, 192, 201, 193, 194, 195, - 196, 197, 198, 200, 199, 0, 0, 0, 0, 0, - 0, 0, 188, 189, 0, 190, 191, 192, 201, 0, - 0, 0, 66, 67, 68, 69, 70, 71, 0, 66, - 67, 68, 69, 70, 71, 0, 0, 73, 74, 0, - 75, 76, 77, 78, 60, 61, 0, 62, 63, 64, - 65, 19, 20, 21, 0, 17, 0, 224, 0, 19, - 20, 21, 0, 17, 0, 222, 0, 19, 20, 21, - 31, 17, 30, 9, 40, 0, 32, 33, 35, 36, - 37, 38, 39, 0, 0, 23, 26, 24, 25, 27, - 14, 0, 15, 23, 26, 24, 25, 27, 14, 163, - 15, 23, 26, 24, 25, 27, 14, 0, 15, 0, - 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, - 0, 22, 19, 20, 21, 160, 17, 0, 132, 22, - 0, 0, 0, 0, 0, 0, 41, 46, 0, 0, - 43, 0, 42, 0, 50, 0, 44, 45, 47, 48, - 49, 52, 51, 0, 0, 0, 23, 26, 24, 25, - 27, 0, 29, 34, 0, 0, 31, 0, 30, 0, - 40, 0, 32, 33, 35, 36, 37, 38, 39, 41, - 46, 0, 0, 43, 22, 42, 0, 50, 0, 44, - 45, 47, 48, 49, 52, 51, 29, 34, 53, 3, - 31, 0, 30, 0, 40, 0, 32, 33, 35, 36, - 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 134, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 89, 90, 91, 95, 0, 0, 0, 169, 0, 0, + 5, 88, 6, 87, 8, 188, 7, 18, 227, 2, + 55, 205, 13, 82, 78, 261, 65, 165, 54, 28, + 192, 193, 58, 194, 195, 196, 205, 269, 268, 128, + 255, 129, 86, 132, 254, 130, 194, 195, 196, 205, + 253, 271, 150, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 206, 207, 197, 198, 199, 200, + 201, 202, 204, 203, 260, 75, 76, 77, 78, 252, + 270, 192, 193, 169, 194, 195, 196, 205, 62, 63, + 64, 65, 190, 264, 189, 179, 181, 182, 183, 184, + 185, 186, 171, 187, 169, 277, 234, 208, 209, 210, + 276, 234, 263, 206, 207, 197, 198, 199, 200, 201, + 202, 204, 203, 262, 66, 67, 68, 69, 70, 71, + 192, 193, 217, 194, 195, 196, 205, 164, 168, 73, + 74, 164, 75, 76, 77, 78, 224, 218, 219, 220, + 221, 73, 74, 259, 75, 76, 77, 78, 225, 273, + 73, 74, 224, 75, 76, 77, 78, 233, 234, 66, + 67, 68, 69, 70, 71, 265, 128, 272, 129, 165, + 132, 226, 130, 229, 73, 74, 223, 75, 76, 77, + 78, 231, 206, 207, 197, 198, 199, 200, 201, 202, + 204, 203, 17, 225, 151, 257, 167, 222, 214, 192, + 193, 172, 194, 195, 196, 205, 235, 236, 237, 238, + 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, + 249, 250, 60, 61, 138, 62, 63, 64, 65, 55, + 126, 55, 215, 216, 125, 124, 267, 123, 266, 231, + 122, 58, 80, 58, 197, 198, 199, 200, 201, 202, + 204, 203, 60, 61, 79, 62, 63, 64, 65, 192, + 193, 72, 194, 195, 196, 205, 128, 57, 129, 256, + 132, 213, 130, 59, 190, 190, 189, 189, 274, 275, + 89, 90, 91, 95, 115, 212, 81, 83, 211, 16, 94, 92, 93, 97, 96, 98, 99, 100, 101, 102, - 103, 104, + 103, 104, 105, 106, 107, 108, 109, 111, 110, 112, + 113, 114, 118, 116, 117, 41, 46, 4, 127, 43, + 12, 42, 10, 50, 131, 44, 45, 47, 48, 49, + 52, 51, 1, 258, 119, 120, 121, 89, 90, 91, + 95, 115, 0, 0, 83, 84, 85, 94, 92, 93, + 97, 96, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 111, 110, 112, 113, 114, 118, + 116, 117, 206, 207, 197, 198, 199, 200, 201, 202, + 204, 203, 251, 0, 0, 0, 0, 0, 0, 192, + 193, 0, 194, 195, 196, 205, 66, 67, 68, 69, + 70, 71, 84, 85, 0, 0, 232, 0, 0, 0, + 0, 60, 61, 0, 62, 63, 64, 65, 0, 0, + 0, 206, 207, 197, 198, 199, 200, 201, 202, 204, + 203, 191, 0, 0, 0, 0, 0, 0, 192, 193, + 0, 194, 195, 196, 205, 206, 207, 197, 198, 199, + 200, 201, 202, 204, 203, 0, 0, 0, 0, 0, + 0, 0, 192, 193, 0, 194, 195, 196, 205, 0, + 0, 0, 206, 207, 197, 198, 199, 200, 201, 202, + 204, 203, 19, 20, 21, 0, 17, 0, 135, 192, + 193, 0, 194, 195, 196, 205, 19, 20, 21, 0, + 17, 0, 135, 0, 19, 20, 21, 0, 17, 0, + 230, 0, 0, 0, 0, 0, 23, 26, 24, 25, + 27, 14, 136, 15, 166, 133, 134, 0, 0, 0, + 23, 26, 24, 25, 27, 14, 136, 15, 23, 26, + 24, 25, 27, 14, 0, 15, 22, 19, 20, 21, + 0, 17, 0, 228, 0, 19, 20, 21, 0, 17, + 22, 9, 0, 41, 46, 0, 0, 43, 22, 42, + 0, 50, 0, 44, 45, 47, 48, 49, 52, 51, + 0, 23, 26, 24, 25, 27, 14, 0, 15, 23, + 26, 24, 25, 27, 14, 0, 15, 19, 20, 21, + 163, 17, 0, 135, 0, 0, 43, 0, 42, 0, + 50, 22, 44, 45, 47, 48, 49, 52, 51, 22, + 0, 0, 19, 20, 21, 0, 0, 0, 180, 0, + 0, 23, 26, 24, 25, 27, 56, 11, 0, 29, + 34, 0, 0, 31, 0, 30, 0, 40, 0, 32, + 33, 35, 36, 37, 38, 39, 23, 26, 24, 25, + 27, 22, 29, 34, 0, 0, 31, 0, 30, 0, + 40, 0, 32, 33, 35, 36, 37, 38, 39, 53, + 3, 31, 0, 30, 0, 40, 22, 32, 33, 35, + 36, 37, 38, 39, 0, 0, 170, 173, 174, 175, + 176, 177, 178, 115, 0, 0, 0, 0, 0, 137, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 105, 106, 107, 108, 109, 111, 110, 112, 113, + 114, 118, 116, 117, 89, 90, 91, 95, 0, 0, + 0, 172, 0, 0, 94, 92, 93, 97, 96, 98, + 99, 100, 101, 102, 103, 104, } var yyPact = [...]int{ - 551, -1000, -34, 636, -1000, 619, -1000, -1000, -1000, 551, - -1000, 467, -1000, 40, 154, 153, -1000, 248, -1000, -1000, - -1000, -1000, 167, 149, 142, 136, 121, 120, 139, 118, - 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, - 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 602, 110, 576, 224, 96, 460, 725, - 109, 109, 109, 109, 109, 109, -1000, -1000, -1000, -1000, - -1000, -1000, 361, 361, 361, 361, 361, 361, 361, 303, - 303, -1000, 389, 303, 303, 303, -1000, -1000, -1000, -1000, + 549, -1000, -32, 610, -1000, 263, -1000, -1000, -1000, 549, + -1000, 342, -1000, 105, 242, 230, -1000, 275, -1000, -1000, + -1000, -1000, 328, 228, 225, 223, 222, 218, 476, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 587, 118, 511, 183, 115, 60, 729, + 189, 189, 189, 189, 189, 189, -1000, -1000, -1000, -1000, + -1000, -1000, 616, 616, 616, 616, 616, 616, 616, 332, + 694, -1000, 420, 332, 332, 332, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, -1000, -1000, -1000, 205, 204, 202, 124, -1000, - -1000, -1000, 86, 303, 303, 303, 303, 619, -1000, -1000, - -1000, -1000, 606, 104, 506, 543, -1000, -1000, -1000, -1000, - 506, -1000, -1000, -1000, -1000, -1000, -1000, 320, 119, -1000, - -1000, -1000, -1000, 320, -1000, -1000, -1000, -1000, -1000, -1000, - -1000, -1000, 139, -1000, -1000, -1000, -1000, 47, -1000, 535, - 17, 17, -63, -63, -63, -63, -2, 361, -32, -32, - -64, -64, -64, -64, 364, 69, 413, -1000, 303, 303, - 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, - 303, 303, 303, 303, 340, -47, -47, 31, -6, -12, - -16, 184, 173, -1000, 293, 163, 85, 5, 576, 174, - 78, 18, 543, -1000, 535, -36, -1000, -1000, 303, -47, - -47, -65, -65, -65, -51, -51, -51, -51, -51, -51, - -51, -51, -65, 435, 435, -1000, -1000, -1000, -1000, -1000, - -19, -20, -1000, -1000, -1000, -1000, -1000, 413, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 284, 281, 267, 194, -1000, + -1000, -1000, 109, 332, 332, 332, 332, -1000, 263, -1000, + -1000, -1000, -1000, 185, 164, 591, 159, 625, 541, -1000, + -1000, -1000, -1000, 625, -1000, -1000, -1000, -1000, -1000, -1000, + 550, 182, -1000, -1000, -1000, -1000, 550, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, 490, -1000, -1000, -1000, -1000, + 153, -1000, 498, 6, 6, -59, -59, -59, -59, 72, + 616, -7, -7, -61, -61, -61, -61, 393, 144, -1000, + -1000, -1000, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 369, -36, + -36, 21, -8, -14, -18, 265, 191, -1000, 320, 130, + 51, 2, 100, 89, 511, 81, 70, 114, 541, -1000, + 498, -34, -1000, -1000, 694, -36, -36, -64, -64, -64, + -49, -49, -49, -49, -49, -49, -49, -49, -64, 190, + 190, -1000, -1000, -1000, -1000, -1000, -20, -21, -1000, -1000, + -1000, -1000, 25, -4, -1000, 490, -1000, -1000, -1000, -1000, + 155, 137, 694, 694, 87, 82, -1000, -1000, } var yyPgo = [...]int{ - 0, 243, 6, 240, 5, 232, 1, 688, 228, 2, - 225, 4, 211, 212, 238, 27, 210, 178, 7, 0, - 14, 171, 122, + 0, 332, 6, 324, 4, 5, 0, 679, 322, 8, + 320, 2, 261, 318, 317, 636, 12, 289, 267, 7, + 13, 32, 3, 1, } var yyR1 = [...]int{ - 0, 1, 1, 1, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 2, 3, - 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 10, 10, 11, - 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, - 14, 14, 14, 14, 14, 14, 16, 17, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 18, 18, 18, 18, 18, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, + 0, 1, 1, 1, 1, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 2, + 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 10, 10, 11, 12, 12, 12, 12, 12, 12, 14, + 14, 15, 15, 15, 15, 15, 15, 15, 15, 17, + 18, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 19, 19, 19, 19, 19, + 13, 13, 13, 13, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, - 22, + 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 23, 23, 23, 23, 23, 23, } var yyR2 = [...]int{ 0, 1, 1, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 1, 3, 1, - 1, 1, 1, 3, 3, 3, 3, 3, 4, 3, - 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 2, 3, 3, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, - 2, 2, 3, 4, 4, 4, 4, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, + 1, 1, 1, 1, 3, 3, 3, 3, 3, 4, + 3, 4, 1, 1, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 2, 3, 3, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, + 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, + 3, 3, 7, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, + 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 3, 4, - 4, + 1, 1, 3, 3, 3, 3, 4, 4, } var yyChk = [...]int{ - -1000, -1, -9, -7, -13, -6, -11, -2, -4, 12, - -8, -14, -10, -15, 45, 47, -16, 10, -18, 6, - 7, 8, 68, 40, 42, 43, 41, 44, 49, 50, - 56, 54, 60, 61, 51, 62, 63, 64, 65, 66, - 58, 50, 56, 54, 60, 61, 51, 62, 63, 64, - 58, 66, 65, -7, -9, -6, -14, -17, -15, -12, - 67, 68, 70, 71, 72, 73, 52, 53, 54, 55, - 56, 57, -12, 67, 68, 70, 71, 72, 73, 12, - 12, 11, -19, 12, 68, 69, -20, -21, -22, 5, + -1000, -1, -9, -7, -14, -6, -11, -2, -4, 12, + -8, -15, -10, -16, 45, 47, -17, 10, -19, 6, + 7, 8, 70, 40, 42, 43, 41, 44, 51, 52, + 58, 56, 62, 63, 53, 64, 65, 66, 67, 68, + 60, 52, 58, 56, 62, 63, 53, 64, 65, 66, + 60, 68, 67, -7, -9, -6, -15, -18, -16, -12, + 69, 70, 72, 73, 74, 75, 54, 55, 56, 57, + 58, 59, -12, 69, 70, 72, 73, 74, 75, 12, + 12, 11, -20, 12, 70, 71, -21, -22, -23, 5, 6, 7, 16, 17, 15, 8, 19, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 32, 34, 35, 36, 9, 38, 39, 37, 6, - 7, 8, 12, 12, 12, 12, 12, -6, -11, -2, - -3, -4, 12, 46, -7, 12, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -6, 12, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - 13, 13, 49, 13, 13, 13, 13, -14, -20, 12, - -14, -14, -14, -14, -14, -14, -15, 12, -15, -15, - -15, -15, -15, -15, -19, -5, -19, 11, 67, 68, - 70, 71, 72, 52, 53, 54, 55, 56, 57, 59, - 58, 73, 50, 51, -19, -19, -19, 4, 4, 4, - 4, 38, 39, 13, -19, -19, -19, -19, -6, -15, - 12, -9, 12, -18, 12, -9, 13, 13, 14, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, 13, 48, 48, 48, 48, - 4, 4, 13, 13, 13, 13, 13, -19, 48, 48, + 7, 8, 12, 12, 12, 12, 12, -13, -6, -11, + -2, -3, -4, 49, 50, 12, 46, -7, 12, -7, + -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, + -6, 12, -6, -6, -6, -6, -6, -6, -6, -6, + -6, -6, -6, 13, 13, 51, 13, 13, 13, 13, + -15, -21, 12, -15, -15, -15, -15, -15, -15, -16, + 12, -16, -16, -16, -16, -16, -16, -20, -5, -22, + -23, 11, 69, 70, 72, 73, 74, 54, 55, 56, + 57, 58, 59, 61, 60, 75, 52, 53, -20, -20, + -20, 4, 4, 4, 4, 38, 39, 13, -20, -20, + -20, -20, 12, 12, -6, -16, 12, -9, 12, -19, + 12, -9, 13, 13, 14, -20, -20, -20, -20, -20, + -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, + -20, 13, 48, 48, 48, 48, 4, 4, 13, 13, + 13, 13, 13, 13, 13, 51, -22, -23, 48, 48, + 45, 45, 12, 12, -5, -5, 13, 13, } var yyDef = [...]int{ - 0, -2, 1, 2, 3, 19, 20, 21, 22, 0, - 17, 0, 46, 0, 0, 0, 65, 0, 75, 76, - 77, 78, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 1, 2, 3, 20, 21, 22, 23, 0, + 18, 0, 49, 0, 0, 0, 68, 0, 78, 79, + 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 50, 51, 52, 53, - 54, 55, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 47, 0, 0, 0, 0, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 0, 0, 23, 24, 25, - 26, 27, 0, 0, 5, 0, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 34, 0, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 4, 18, 0, 33, 58, 66, 68, 56, 57, 0, - 59, 60, 61, 62, 63, 64, 49, 0, 69, 70, - 71, 72, 73, 74, 0, 0, 31, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, - 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -2, 0, 0, 28, 30, 0, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 87, 135, 136, 137, 138, - 0, 0, 83, 84, 85, 86, 29, 32, 139, 140, + 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 53, 54, 55, 56, + 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 50, 0, 0, 0, 0, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 0, 0, 0, 0, 82, + 83, 84, 0, 0, 0, 0, 0, 4, 24, 25, + 26, 27, 28, 0, 0, 0, 0, 6, 0, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 37, 0, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 5, 19, 0, 36, 61, 69, 71, + 59, 60, 0, 62, 63, 64, 65, 66, 67, 52, + 0, 72, 73, 74, 75, 76, 77, 0, 0, 32, + 33, 51, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, + 112, 0, 0, 0, 0, 0, 0, 85, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, + 0, 0, 29, 31, 0, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 94, 142, 143, 144, 145, 0, 0, 86, 87, + 88, 89, 90, 91, 30, 0, 34, 35, 146, 147, + 0, 0, 0, 0, 0, 0, 92, 93, } var yyTok1 = [...]int{ @@ -434,7 +445,7 @@ var yyTok2 = [...]int{ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, + 72, 73, 74, 75, } var yyTok3 = [...]int{ 0, @@ -779,841 +790,883 @@ yydefault: case 1: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:98 +//line pkg/traceql/expr.y:101 { yylex.(*lexer).expr = newRootExpr(yyDollar[1].spansetPipeline) } case 2: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:99 +//line pkg/traceql/expr.y:102 { yylex.(*lexer).expr = newRootExpr(yyDollar[1].spansetPipelineExpression) } case 3: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:100 +//line pkg/traceql/expr.y:103 { yylex.(*lexer).expr = newRootExpr(yyDollar[1].scalarPipelineExpressionFilter) } case 4: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:107 +//line pkg/traceql/expr.y:104 { - yyVAL.spansetPipelineExpression = yyDollar[2].spansetPipelineExpression + yylex.(*lexer).expr = newRootExprWithMetrics(yyDollar[1].spansetPipeline, yyDollar[3].metricsAggregation) } case 5: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:108 +//line pkg/traceql/expr.y:111 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = yyDollar[2].spansetPipelineExpression } case 6: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:109 +//line pkg/traceql/expr.y:112 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 7: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:110 +//line pkg/traceql/expr.y:113 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 8: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:111 +//line pkg/traceql/expr.y:114 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 9: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:112 +//line pkg/traceql/expr.y:115 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 10: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:113 +//line pkg/traceql/expr.y:116 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 11: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:114 +//line pkg/traceql/expr.y:117 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 12: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:115 +//line pkg/traceql/expr.y:118 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 13: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:116 +//line pkg/traceql/expr.y:119 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 14: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:117 +//line pkg/traceql/expr.y:120 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 15: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:118 +//line pkg/traceql/expr.y:121 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 16: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:119 +//line pkg/traceql/expr.y:122 { - yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 17: - yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:120 + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:123 { - yyVAL.spansetPipelineExpression = yyDollar[1].wrappedSpansetPipeline + yyVAL.spansetPipelineExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetPipelineExpression, yyDollar[3].spansetPipelineExpression) } case 18: - yyDollar = yyS[yypt-3 : yypt+1] + yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:124 { - yyVAL.wrappedSpansetPipeline = yyDollar[2].spansetPipeline + yyVAL.spansetPipelineExpression = yyDollar[1].wrappedSpansetPipeline } case 19: - yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:127 + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:128 { - yyVAL.spansetPipeline = newPipeline(yyDollar[1].spansetExpression) + yyVAL.wrappedSpansetPipeline = yyDollar[2].spansetPipeline } case 20: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:128 +//line pkg/traceql/expr.y:131 { - yyVAL.spansetPipeline = newPipeline(yyDollar[1].scalarFilter) + yyVAL.spansetPipeline = newPipeline(yyDollar[1].spansetExpression) } case 21: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:129 +//line pkg/traceql/expr.y:132 { - yyVAL.spansetPipeline = newPipeline(yyDollar[1].groupOperation) + yyVAL.spansetPipeline = newPipeline(yyDollar[1].scalarFilter) } case 22: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:130 +//line pkg/traceql/expr.y:133 { - yyVAL.spansetPipeline = newPipeline(yyDollar[1].selectOperation) + yyVAL.spansetPipeline = newPipeline(yyDollar[1].groupOperation) } case 23: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:131 + yyDollar = yyS[yypt-1 : yypt+1] +//line pkg/traceql/expr.y:134 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].spansetExpression) + yyVAL.spansetPipeline = newPipeline(yyDollar[1].selectOperation) } case 24: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:132 +//line pkg/traceql/expr.y:135 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].scalarFilter) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].spansetExpression) } case 25: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:133 +//line pkg/traceql/expr.y:136 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].groupOperation) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].scalarFilter) } case 26: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:134 +//line pkg/traceql/expr.y:137 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].coalesceOperation) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].groupOperation) } case 27: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:135 +//line pkg/traceql/expr.y:138 { - yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].selectOperation) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].coalesceOperation) } case 28: - yyDollar = yyS[yypt-4 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:139 { - yyVAL.groupOperation = newGroupOperation(yyDollar[3].fieldExpression) + yyVAL.spansetPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].selectOperation) } case 29: - yyDollar = yyS[yypt-3 : yypt+1] + yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:143 { - yyVAL.coalesceOperation = newCoalesceOperation() + yyVAL.groupOperation = newGroupOperation(yyDollar[3].fieldExpression) } case 30: - yyDollar = yyS[yypt-4 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:147 { - yyVAL.selectOperation = newSelectOperation(yyDollar[3].selectArgs) + yyVAL.coalesceOperation = newCoalesceOperation() } case 31: - yyDollar = yyS[yypt-1 : yypt+1] + yyDollar = yyS[yypt-4 : yypt+1] //line pkg/traceql/expr.y:151 { - yyVAL.selectArgs = []FieldExpression{yyDollar[1].fieldExpression} + yyVAL.selectOperation = newSelectOperation(yyDollar[3].attributeList) } case 32: - yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:152 + yyDollar = yyS[yypt-1 : yypt+1] +//line pkg/traceql/expr.y:155 { - yyVAL.selectArgs = append(yyDollar[1].selectArgs, yyDollar[3].fieldExpression) + yyVAL.attributeList = []Attribute{yyDollar[1].intrinsicField} } case 33: - yyDollar = yyS[yypt-3 : yypt+1] + yyDollar = yyS[yypt-1 : yypt+1] //line pkg/traceql/expr.y:156 { - yyVAL.spansetExpression = yyDollar[2].spansetExpression + yyVAL.attributeList = []Attribute{yyDollar[1].attributeField} } case 34: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:157 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.attributeList = append(yyDollar[1].attributeList, yyDollar[3].intrinsicField) } case 35: yyDollar = yyS[yypt-3 : yypt+1] //line pkg/traceql/expr.y:158 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.attributeList = append(yyDollar[1].attributeList, yyDollar[3].attributeField) } case 36: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:159 +//line pkg/traceql/expr.y:162 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = yyDollar[2].spansetExpression } case 37: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:160 +//line pkg/traceql/expr.y:163 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetAnd, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 38: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:161 +//line pkg/traceql/expr.y:164 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetChild, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 39: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:162 +//line pkg/traceql/expr.y:165 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetParent, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 40: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:163 +//line pkg/traceql/expr.y:166 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetDescendant, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 41: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:165 +//line pkg/traceql/expr.y:167 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetAncestor, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 42: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:166 +//line pkg/traceql/expr.y:168 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetUnion, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 43: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:167 +//line pkg/traceql/expr.y:169 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetSibling, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 44: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:168 +//line pkg/traceql/expr.y:171 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotChild, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 45: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:169 +//line pkg/traceql/expr.y:172 { - yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotParent, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) } case 46: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:173 + { + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotSibling, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + } + case 47: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:174 + { + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotAncestor, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + } + case 48: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:175 + { + yyVAL.spansetExpression = newSpansetOperation(OpSpansetNotDescendant, yyDollar[1].spansetExpression, yyDollar[3].spansetExpression) + } + case 49: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:171 +//line pkg/traceql/expr.y:177 { yyVAL.spansetExpression = yyDollar[1].spansetFilter } - case 47: + case 50: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:175 +//line pkg/traceql/expr.y:181 { yyVAL.spansetFilter = newSpansetFilter(NewStaticBool(true)) } - case 48: + case 51: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:176 +//line pkg/traceql/expr.y:182 { yyVAL.spansetFilter = newSpansetFilter(yyDollar[2].fieldExpression) } - case 49: + case 52: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:180 +//line pkg/traceql/expr.y:186 { yyVAL.scalarFilter = newScalarFilter(yyDollar[2].scalarFilterOperation, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 50: + case 53: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:184 +//line pkg/traceql/expr.y:190 { yyVAL.scalarFilterOperation = OpEqual } - case 51: + case 54: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:185 +//line pkg/traceql/expr.y:191 { yyVAL.scalarFilterOperation = OpNotEqual } - case 52: + case 55: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:186 +//line pkg/traceql/expr.y:192 { yyVAL.scalarFilterOperation = OpLess } - case 53: + case 56: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:187 +//line pkg/traceql/expr.y:193 { yyVAL.scalarFilterOperation = OpLessEqual } - case 54: + case 57: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:188 +//line pkg/traceql/expr.y:194 { yyVAL.scalarFilterOperation = OpGreater } - case 55: + case 58: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:189 +//line pkg/traceql/expr.y:195 { yyVAL.scalarFilterOperation = OpGreaterEqual } - case 56: + case 59: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:196 +//line pkg/traceql/expr.y:202 { yyVAL.scalarPipelineExpressionFilter = newScalarFilter(yyDollar[2].scalarFilterOperation, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 57: + case 60: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:197 +//line pkg/traceql/expr.y:203 { yyVAL.scalarPipelineExpressionFilter = newScalarFilter(yyDollar[2].scalarFilterOperation, yyDollar[1].scalarPipelineExpression, yyDollar[3].static) } - case 58: + case 61: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:201 +//line pkg/traceql/expr.y:207 { yyVAL.scalarPipelineExpression = yyDollar[2].scalarPipelineExpression } - case 59: + case 62: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:202 +//line pkg/traceql/expr.y:208 { yyVAL.scalarPipelineExpression = newScalarOperation(OpAdd, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 60: + case 63: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:203 +//line pkg/traceql/expr.y:209 { yyVAL.scalarPipelineExpression = newScalarOperation(OpSub, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 61: + case 64: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:204 +//line pkg/traceql/expr.y:210 { yyVAL.scalarPipelineExpression = newScalarOperation(OpMult, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 62: + case 65: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:205 +//line pkg/traceql/expr.y:211 { yyVAL.scalarPipelineExpression = newScalarOperation(OpDiv, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 63: + case 66: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:206 +//line pkg/traceql/expr.y:212 { yyVAL.scalarPipelineExpression = newScalarOperation(OpMod, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 64: + case 67: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:207 +//line pkg/traceql/expr.y:213 { yyVAL.scalarPipelineExpression = newScalarOperation(OpPower, yyDollar[1].scalarPipelineExpression, yyDollar[3].scalarPipelineExpression) } - case 65: + case 68: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:208 +//line pkg/traceql/expr.y:214 { yyVAL.scalarPipelineExpression = yyDollar[1].wrappedScalarPipeline } - case 66: + case 69: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:212 +//line pkg/traceql/expr.y:218 { yyVAL.wrappedScalarPipeline = yyDollar[2].scalarPipeline } - case 67: + case 70: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:216 +//line pkg/traceql/expr.y:222 { yyVAL.scalarPipeline = yyDollar[1].spansetPipeline.addItem(yyDollar[3].aggregate) } - case 68: + case 71: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:220 +//line pkg/traceql/expr.y:226 { yyVAL.scalarExpression = yyDollar[2].scalarExpression } - case 69: + case 72: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:221 +//line pkg/traceql/expr.y:227 { yyVAL.scalarExpression = newScalarOperation(OpAdd, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 70: + case 73: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:222 +//line pkg/traceql/expr.y:228 { yyVAL.scalarExpression = newScalarOperation(OpSub, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 71: + case 74: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:223 +//line pkg/traceql/expr.y:229 { yyVAL.scalarExpression = newScalarOperation(OpMult, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 72: + case 75: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:224 +//line pkg/traceql/expr.y:230 { yyVAL.scalarExpression = newScalarOperation(OpDiv, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 73: + case 76: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:225 +//line pkg/traceql/expr.y:231 { yyVAL.scalarExpression = newScalarOperation(OpMod, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 74: + case 77: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:226 +//line pkg/traceql/expr.y:232 { yyVAL.scalarExpression = newScalarOperation(OpPower, yyDollar[1].scalarExpression, yyDollar[3].scalarExpression) } - case 75: + case 78: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:227 +//line pkg/traceql/expr.y:233 { yyVAL.scalarExpression = yyDollar[1].aggregate } - case 76: + case 79: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:228 +//line pkg/traceql/expr.y:234 { yyVAL.scalarExpression = NewStaticInt(yyDollar[1].staticInt) } - case 77: + case 80: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:229 +//line pkg/traceql/expr.y:235 { yyVAL.scalarExpression = NewStaticFloat(yyDollar[1].staticFloat) } - case 78: + case 81: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:230 +//line pkg/traceql/expr.y:236 { yyVAL.scalarExpression = NewStaticDuration(yyDollar[1].staticDuration) } - case 79: + case 82: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:231 +//line pkg/traceql/expr.y:237 { yyVAL.scalarExpression = NewStaticInt(-yyDollar[2].staticInt) } - case 80: + case 83: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:232 +//line pkg/traceql/expr.y:238 { yyVAL.scalarExpression = NewStaticFloat(-yyDollar[2].staticFloat) } - case 81: + case 84: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:233 +//line pkg/traceql/expr.y:239 { yyVAL.scalarExpression = NewStaticDuration(-yyDollar[2].staticDuration) } - case 82: + case 85: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:237 +//line pkg/traceql/expr.y:243 { yyVAL.aggregate = newAggregate(aggregateCount, nil) } - case 83: + case 86: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:238 +//line pkg/traceql/expr.y:244 { yyVAL.aggregate = newAggregate(aggregateMax, yyDollar[3].fieldExpression) } - case 84: + case 87: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:239 +//line pkg/traceql/expr.y:245 { yyVAL.aggregate = newAggregate(aggregateMin, yyDollar[3].fieldExpression) } - case 85: + case 88: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:240 +//line pkg/traceql/expr.y:246 { yyVAL.aggregate = newAggregate(aggregateAvg, yyDollar[3].fieldExpression) } - case 86: + case 89: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:241 +//line pkg/traceql/expr.y:247 { yyVAL.aggregate = newAggregate(aggregateSum, yyDollar[3].fieldExpression) } - case 87: + case 90: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:248 +//line pkg/traceql/expr.y:254 + { + yyVAL.metricsAggregation = newMetricsAggregate(metricsAggregateRate, nil) + } + case 91: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:255 + { + yyVAL.metricsAggregation = newMetricsAggregate(metricsAggregateCountOverTime, nil) + } + case 92: + yyDollar = yyS[yypt-7 : yypt+1] +//line pkg/traceql/expr.y:256 + { + yyVAL.metricsAggregation = newMetricsAggregate(metricsAggregateRate, yyDollar[6].attributeList) + } + case 93: + yyDollar = yyS[yypt-7 : yypt+1] +//line pkg/traceql/expr.y:257 + { + yyVAL.metricsAggregation = newMetricsAggregate(metricsAggregateCountOverTime, yyDollar[6].attributeList) + } + case 94: + yyDollar = yyS[yypt-3 : yypt+1] +//line pkg/traceql/expr.y:264 { yyVAL.fieldExpression = yyDollar[2].fieldExpression } - case 88: + case 95: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:249 +//line pkg/traceql/expr.y:265 { yyVAL.fieldExpression = newBinaryOperation(OpAdd, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 89: + case 96: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:250 +//line pkg/traceql/expr.y:266 { yyVAL.fieldExpression = newBinaryOperation(OpSub, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 90: + case 97: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:251 +//line pkg/traceql/expr.y:267 { yyVAL.fieldExpression = newBinaryOperation(OpMult, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 91: + case 98: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:252 +//line pkg/traceql/expr.y:268 { yyVAL.fieldExpression = newBinaryOperation(OpDiv, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 92: + case 99: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:253 +//line pkg/traceql/expr.y:269 { yyVAL.fieldExpression = newBinaryOperation(OpMod, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 93: + case 100: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:254 +//line pkg/traceql/expr.y:270 { yyVAL.fieldExpression = newBinaryOperation(OpEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 94: + case 101: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:255 +//line pkg/traceql/expr.y:271 { yyVAL.fieldExpression = newBinaryOperation(OpNotEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 95: + case 102: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:256 +//line pkg/traceql/expr.y:272 { yyVAL.fieldExpression = newBinaryOperation(OpLess, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 96: + case 103: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:257 +//line pkg/traceql/expr.y:273 { yyVAL.fieldExpression = newBinaryOperation(OpLessEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 97: + case 104: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:258 +//line pkg/traceql/expr.y:274 { yyVAL.fieldExpression = newBinaryOperation(OpGreater, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 98: + case 105: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:259 +//line pkg/traceql/expr.y:275 { yyVAL.fieldExpression = newBinaryOperation(OpGreaterEqual, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 99: + case 106: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:260 +//line pkg/traceql/expr.y:276 { yyVAL.fieldExpression = newBinaryOperation(OpRegex, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 100: + case 107: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:261 +//line pkg/traceql/expr.y:277 { yyVAL.fieldExpression = newBinaryOperation(OpNotRegex, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 101: + case 108: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:262 +//line pkg/traceql/expr.y:278 { yyVAL.fieldExpression = newBinaryOperation(OpPower, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 102: + case 109: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:263 +//line pkg/traceql/expr.y:279 { yyVAL.fieldExpression = newBinaryOperation(OpAnd, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 103: + case 110: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:264 +//line pkg/traceql/expr.y:280 { yyVAL.fieldExpression = newBinaryOperation(OpOr, yyDollar[1].fieldExpression, yyDollar[3].fieldExpression) } - case 104: + case 111: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:265 +//line pkg/traceql/expr.y:281 { yyVAL.fieldExpression = newUnaryOperation(OpSub, yyDollar[2].fieldExpression) } - case 105: + case 112: yyDollar = yyS[yypt-2 : yypt+1] -//line pkg/traceql/expr.y:266 +//line pkg/traceql/expr.y:282 { yyVAL.fieldExpression = newUnaryOperation(OpNot, yyDollar[2].fieldExpression) } - case 106: + case 113: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:267 +//line pkg/traceql/expr.y:283 { yyVAL.fieldExpression = yyDollar[1].static } - case 107: + case 114: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:268 +//line pkg/traceql/expr.y:284 { yyVAL.fieldExpression = yyDollar[1].intrinsicField } - case 108: + case 115: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:269 +//line pkg/traceql/expr.y:285 { yyVAL.fieldExpression = yyDollar[1].attributeField } - case 109: + case 116: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:276 +//line pkg/traceql/expr.y:292 { yyVAL.static = NewStaticString(yyDollar[1].staticStr) } - case 110: + case 117: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:277 +//line pkg/traceql/expr.y:293 { yyVAL.static = NewStaticInt(yyDollar[1].staticInt) } - case 111: + case 118: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:278 +//line pkg/traceql/expr.y:294 { yyVAL.static = NewStaticFloat(yyDollar[1].staticFloat) } - case 112: + case 119: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:279 +//line pkg/traceql/expr.y:295 { yyVAL.static = NewStaticBool(true) } - case 113: + case 120: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:280 +//line pkg/traceql/expr.y:296 { yyVAL.static = NewStaticBool(false) } - case 114: + case 121: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:281 +//line pkg/traceql/expr.y:297 { yyVAL.static = NewStaticNil() } - case 115: + case 122: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:282 +//line pkg/traceql/expr.y:298 { yyVAL.static = NewStaticDuration(yyDollar[1].staticDuration) } - case 116: + case 123: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:283 +//line pkg/traceql/expr.y:299 { yyVAL.static = NewStaticStatus(StatusOk) } - case 117: + case 124: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:284 +//line pkg/traceql/expr.y:300 { yyVAL.static = NewStaticStatus(StatusError) } - case 118: + case 125: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:285 +//line pkg/traceql/expr.y:301 { yyVAL.static = NewStaticStatus(StatusUnset) } - case 119: + case 126: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:286 +//line pkg/traceql/expr.y:302 { yyVAL.static = NewStaticKind(KindUnspecified) } - case 120: + case 127: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:287 +//line pkg/traceql/expr.y:303 { yyVAL.static = NewStaticKind(KindInternal) } - case 121: + case 128: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:288 +//line pkg/traceql/expr.y:304 { yyVAL.static = NewStaticKind(KindServer) } - case 122: + case 129: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:289 +//line pkg/traceql/expr.y:305 { yyVAL.static = NewStaticKind(KindClient) } - case 123: + case 130: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:290 +//line pkg/traceql/expr.y:306 { yyVAL.static = NewStaticKind(KindProducer) } - case 124: + case 131: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:291 +//line pkg/traceql/expr.y:307 { yyVAL.static = NewStaticKind(KindConsumer) } - case 125: + case 132: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:295 +//line pkg/traceql/expr.y:311 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicDuration) } - case 126: + case 133: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:296 +//line pkg/traceql/expr.y:312 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicChildCount) } - case 127: + case 134: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:297 +//line pkg/traceql/expr.y:313 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicName) } - case 128: + case 135: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:298 +//line pkg/traceql/expr.y:314 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicStatus) } - case 129: + case 136: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:299 +//line pkg/traceql/expr.y:315 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicStatusMessage) } - case 130: + case 137: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:300 +//line pkg/traceql/expr.y:316 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicKind) } - case 131: + case 138: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:301 +//line pkg/traceql/expr.y:317 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicParent) } - case 132: + case 139: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:302 +//line pkg/traceql/expr.y:318 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceRootSpan) } - case 133: + case 140: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:303 +//line pkg/traceql/expr.y:319 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceRootService) } - case 134: + case 141: yyDollar = yyS[yypt-1 : yypt+1] -//line pkg/traceql/expr.y:304 +//line pkg/traceql/expr.y:320 { yyVAL.intrinsicField = NewIntrinsic(IntrinsicTraceDuration) } - case 135: + case 142: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:308 +//line pkg/traceql/expr.y:324 { yyVAL.attributeField = NewAttribute(yyDollar[2].staticStr) } - case 136: + case 143: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:309 +//line pkg/traceql/expr.y:325 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeResource, false, yyDollar[2].staticStr) } - case 137: + case 144: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:310 +//line pkg/traceql/expr.y:326 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeSpan, false, yyDollar[2].staticStr) } - case 138: + case 145: yyDollar = yyS[yypt-3 : yypt+1] -//line pkg/traceql/expr.y:311 +//line pkg/traceql/expr.y:327 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeNone, true, yyDollar[2].staticStr) } - case 139: + case 146: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:312 +//line pkg/traceql/expr.y:328 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeResource, true, yyDollar[3].staticStr) } - case 140: + case 147: yyDollar = yyS[yypt-4 : yypt+1] -//line pkg/traceql/expr.y:313 +//line pkg/traceql/expr.y:329 { yyVAL.attributeField = NewScopedAttribute(AttributeScopeSpan, true, yyDollar[3].staticStr) } diff --git a/pkg/traceql/lexer.go b/pkg/traceql/lexer.go index 71ba43f73b3..107ca0d6201 100644 --- a/pkg/traceql/lexer.go +++ b/pkg/traceql/lexer.go @@ -78,6 +78,8 @@ var tokens = map[string]int{ "by": BY, "coalesce": COALESCE, "select": SELECT, + "rate": RATE, + "count_over_time": COUNT_OVER_TIME, } type lexer struct { diff --git a/pkg/traceql/parse_test.go b/pkg/traceql/parse_test.go index 81a8da5810f..a6abd2455a7 100644 --- a/pkg/traceql/parse_test.go +++ b/pkg/traceql/parse_test.go @@ -13,6 +13,7 @@ func TestPipelineErrors(t *testing.T) { in string err error }{ + {in: "", err: newParseError("syntax error: unexpected $end", 0, 0)}, {in: "{ .a } | { .b", err: newParseError("syntax error: unexpected $end", 1, 14)}, {in: "{ .a | .b }", err: newParseError("syntax error: unexpected |", 1, 6)}, {in: "({ .a } | { .b }", err: newParseError("syntax error: unexpected $end, expecting ) or |", 1, 17)}, @@ -97,7 +98,7 @@ func TestPipelineOperatorPrecedence(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -257,7 +258,7 @@ func TestPipelineSpansetOperators(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -339,7 +340,7 @@ func TestPipelineScalarOperators(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -379,7 +380,7 @@ func TestPipelines(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{tc.expected}, actual) + require.Equal(t, newRootExpr(tc.expected), actual) }) } } @@ -417,7 +418,7 @@ func TestGroupCoalesceOperation(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{tc.expected}, actual) + require.Equal(t, newRootExpr(tc.expected), actual) }) } } @@ -445,8 +446,8 @@ func TestSelectOperation(t *testing.T) { in string expected Pipeline }{ - {in: "select(.a)", expected: newPipeline(newSelectOperation([]FieldExpression{NewAttribute("a")}))}, - {in: "select(.a,.b)", expected: newPipeline(newSelectOperation([]FieldExpression{NewAttribute("a"), NewAttribute("b")}))}, + {in: "select(.a)", expected: newPipeline(newSelectOperation([]Attribute{NewAttribute("a")}))}, + {in: "select(.a,.b)", expected: newPipeline(newSelectOperation([]Attribute{NewAttribute("a"), NewAttribute("b")}))}, } for _, tc := range tests { @@ -454,7 +455,7 @@ func TestSelectOperation(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{tc.expected}, actual) + require.Equal(t, newRootExpr(tc.expected), actual) }) } } @@ -523,7 +524,7 @@ func TestSpansetExpressionPrecedence(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -554,7 +555,7 @@ func TestSpansetExpressionOperators(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -611,7 +612,7 @@ func TestScalarExpressionPrecedence(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -633,7 +634,7 @@ func TestScalarExpressionOperators(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(tc.expected)}, actual) + require.Equal(t, newRootExpr(newPipeline(tc.expected)), actual) }) } } @@ -772,7 +773,7 @@ func TestSpansetFilterOperatorPrecedence(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) }) } } @@ -815,7 +816,7 @@ func TestSpansetFilterStatics(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) }) } } @@ -859,7 +860,7 @@ func TestSpansetFilterOperators(t *testing.T) { test := func(q string, expected FieldExpression) { actual, err := Parse(q) require.NoError(t, err, q) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(expected))}, actual, q) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(expected))), actual, q) } for _, tc := range tests { @@ -940,25 +941,25 @@ func TestAttributes(t *testing.T) { actual, err := Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) s = "{" + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) s = "{ (" + tc.in + ") }" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(tc.expected))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(tc.expected))), actual) s = "{ " + tc.in + " + " + tc.in + " }" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(newBinaryOperation(OpAdd, tc.expected, tc.expected)))}, actual) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(newBinaryOperation(OpAdd, tc.expected, tc.expected)))), actual) }) } } @@ -987,65 +988,65 @@ func TestIntrinsics(t *testing.T) { actual, err := Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeNone, Parent: false, Name: tc.in, Intrinsic: tc.expected, - }))}, actual) + }))), actual) // as attribute e.g .duration s = "{ ." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeNone, Parent: false, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as span scoped attribute e.g span.duration s = "{ span." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeSpan, Parent: false, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as resource scoped attribute e.g resource.duration s = "{ resource." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeResource, Parent: false, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as parent scoped intrinsic e.g parent.duration s = "{ parent." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeNone, Parent: true, Name: tc.in, Intrinsic: tc.expected, - }))}, actual) + }))), actual) // as nested parent scoped intrinsic e.g. parent.duration.foo // this becomes lookup on attribute named "duration.foo" @@ -1053,39 +1054,39 @@ func TestIntrinsics(t *testing.T) { actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeNone, Parent: true, Name: tc.in + ".foo", Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as parent resource scoped attribute e.g. parent.resource.duration s = "{ parent.resource." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeResource, Parent: true, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) // as parent span scoped attribute e.g. praent.span.duration s = "{ parent.span." + tc.in + "}" actual, err = Parse(s) require.NoError(t, err) - require.Equal(t, &RootExpr{newPipeline( + require.Equal(t, newRootExpr(newPipeline( newSpansetFilter(Attribute{ Scope: AttributeScopeSpan, Parent: true, Name: tc.in, Intrinsic: IntrinsicNone, - }))}, actual) + }))), actual) }) } } @@ -1123,7 +1124,7 @@ func TestEmptyQuery(t *testing.T) { t.Run(tc.in, func(t *testing.T) { actual, err := Parse(tc.in) require.NoError(t, err, tc.in) - require.Equal(t, &RootExpr{newPipeline(newSpansetFilter(NewStaticBool(true)))}, actual, tc.in) + require.Equal(t, newRootExpr(newPipeline(newSpansetFilter(NewStaticBool(true)))), actual, tc.in) }) } } diff --git a/pkg/traceql/storage.go b/pkg/traceql/storage.go index 97712bc30d9..804bc3df996 100644 --- a/pkg/traceql/storage.go +++ b/pkg/traceql/storage.go @@ -54,6 +54,10 @@ type FetchSpansRequest struct { EndTimeUnixNanos uint64 Conditions []Condition + // mdisibio - Better to push trace by ID filtering into Conditions with a new between op? + Shard int + Of int + // Hints // By default the storage layer fetches spans meeting any of the criteria. @@ -76,6 +80,21 @@ func (f *FetchSpansRequest) appendCondition(c ...Condition) { f.Conditions = append(f.Conditions, c...) } +func (f *FetchSpansRequest) HasAttribute(a Attribute) bool { + for _, cc := range f.Conditions { + if cc.Attribute == a { + return true + } + } + for _, cc := range f.SecondPassConditions { + if cc.Attribute == a { + return true + } + } + + return false +} + type Span interface { // AttributeFor returns the attribute for the given key. If the attribute is not found then // the second return value will be false. diff --git a/pkg/traceql/test_examples.yaml b/pkg/traceql/test_examples.yaml index 6949f1b3aa8..75e3c7e45d7 100644 --- a/pkg/traceql/test_examples.yaml +++ b/pkg/traceql/test_examples.yaml @@ -157,6 +157,7 @@ parse_fails: # select - 'select(.a' - 'select()' + - 'select(1 + "string")' # Don't support arbitrary field expressions # pipelines - 'coalesce() | { true }' # pipelines can't start with coalesce - 'count() > 3 && { true }' # scalar filters have to be in pipeline @@ -230,8 +231,6 @@ validate_fails: - 'min(1) = max(2) + 3' - 'min(1.1 - 3) > 1' - 'max(1h + 2h) > 1' - # select - - 'select(1 + "string")' # by - will *not* be valid when supported - group expressions must reference the span - '{ true } | by(1)' - '{ true } | by("foo")' diff --git a/pkg/traceqlmetrics/metrics.go b/pkg/traceqlmetrics/metrics.go index ef9bc074a2e..dd343ee39e3 100644 --- a/pkg/traceqlmetrics/metrics.go +++ b/pkg/traceqlmetrics/metrics.go @@ -203,7 +203,7 @@ func GetMetrics(ctx context.Context, query, groupBy string, spanLimit int, start groupByKeys[i] = groupBys[i][0].String() } - eval, req, err := traceql.NewEngine().Compile(query) + eval, _, req, err := traceql.NewEngine().Compile(query) if err != nil { return nil, fmt.Errorf("compiling query: %w", err) } From 3bd5d7a2e5ae5a13dab5daeac39f69065b928d88 Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Tue, 12 Dec 2023 13:35:29 -0500 Subject: [PATCH 2/9] Fix test --- pkg/traceql/engine_metrics_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/traceql/engine_metrics_test.go b/pkg/traceql/engine_metrics_test.go index 82a010d7b3c..a8a50dcc5e9 100644 --- a/pkg/traceql/engine_metrics_test.go +++ b/pkg/traceql/engine_metrics_test.go @@ -15,8 +15,8 @@ func TestDefaultQueryRangeStep(t *testing.T) { expected time.Duration }{ {time.Unix(0, 0), time.Unix(100, 0), time.Second}, - {time.Unix(0, 0), time.Unix(600, 0), 5 * time.Second}, - {time.Unix(0, 0), time.Unix(3600, 0), 30 * time.Second}, + {time.Unix(0, 0), time.Unix(600, 0), 2 * time.Second}, + {time.Unix(0, 0), time.Unix(3600, 0), 15 * time.Second}, } for _, c := range tc { From 7f7fea9fa5fe88aa20f46e9b863664e1369f2ecf Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Tue, 12 Dec 2023 15:00:44 -0500 Subject: [PATCH 3/9] regen proto --- pkg/tempopb/tempo.pb.go | 327 ++++++++++++++++++---------------------- pkg/tempopb/tempo.proto | 1 - 2 files changed, 145 insertions(+), 183 deletions(-) diff --git a/pkg/tempopb/tempo.pb.go b/pkg/tempopb/tempo.pb.go index feaaf5ee40b..e32e831b58f 100644 --- a/pkg/tempopb/tempo.pb.go +++ b/pkg/tempopb/tempo.pb.go @@ -2687,153 +2687,152 @@ func init() { func init() { proto.RegisterFile("pkg/tempopb/tempo.proto", fileDescriptor_f22805646f4f62b6) } var fileDescriptor_f22805646f4f62b6 = []byte{ - // 2324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcf, 0x6f, 0x1b, 0xc7, - 0xf5, 0xd7, 0xf2, 0x97, 0xc4, 0x47, 0x4a, 0xa6, 0xc6, 0xb6, 0x4c, 0xd3, 0x8e, 0xa4, 0xef, 0xc6, - 0xf8, 0x56, 0x49, 0x1d, 0x49, 0x66, 0x6c, 0xa4, 0x8a, 0x8b, 0x16, 0x96, 0xa5, 0xfa, 0x47, 0x2c, - 0x47, 0x19, 0x2a, 0x2e, 0xd0, 0x8b, 0xb1, 0x5c, 0x8e, 0xe8, 0x85, 0xb8, 0xbb, 0xcc, 0xee, 0x50, - 0x31, 0x7b, 0x2c, 0xd0, 0x02, 0x45, 0x7b, 0xe8, 0xa1, 0x3d, 0xf4, 0xd8, 0x53, 0xd0, 0x73, 0xff, - 0x84, 0x02, 0x45, 0x2e, 0x2d, 0x72, 0x2c, 0x7a, 0x08, 0x0a, 0xfb, 0xd0, 0x73, 0xff, 0x83, 0xe2, - 0xbd, 0x99, 0xd9, 0x1f, 0x24, 0x25, 0x23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bd, 0x34, 0x25, 0xa9, 0xf4, 0x92, 0x41, 0xd8, 0xbb, 0x30, 0x1f, 0xeb, 0x9c, 0x51, 0x21, - 0x0f, 0x34, 0x52, 0x0f, 0x28, 0x9c, 0x1b, 0x02, 0xbb, 0x09, 0x0b, 0xba, 0x89, 0x67, 0xa2, 0x38, - 0x93, 0x9c, 0x30, 0xec, 0x9f, 0x5a, 0x30, 0xaf, 0x51, 0xf6, 0x36, 0x94, 0x11, 0x37, 0x9b, 0xb3, - 0x98, 0x1b, 0xc6, 0x55, 0x1f, 0xba, 0xd0, 0x77, 0xa4, 0xfb, 0x42, 0xf4, 0x74, 0x82, 0x35, 0x22, + // 2320 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4f, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0xf2, 0x9f, 0xc4, 0x47, 0x4a, 0xa6, 0xc6, 0xb6, 0x4c, 0xd3, 0x8e, 0xa4, 0x6e, 0x8c, + 0x56, 0x49, 0x1d, 0x49, 0x66, 0x6c, 0xa4, 0x8a, 0x8b, 0x16, 0x96, 0xa5, 0xfa, 0x4f, 0x2c, 0x47, + 0x19, 0x2a, 0x2e, 0xd0, 0x8b, 0xb1, 0x5c, 0x8e, 0xe8, 0x85, 0xb8, 0xbb, 0xcc, 0xee, 0x50, 0x31, + 0x7b, 0x2c, 0xd0, 0x02, 0x45, 0x7b, 0xe8, 0xa1, 0x3d, 0xf4, 0x52, 0xa0, 0xa7, 0xa0, 0xe7, 0x7e, + 0x84, 0x02, 0x45, 0x2e, 0x2d, 0x72, 0x2c, 0x7a, 0x08, 0x0a, 0xfb, 0x13, 0xf4, 0x1b, 0x14, 0xef, + 0xcd, 0xcc, 0xfe, 0x21, 0x29, 0x19, 0x69, 0x0f, 0x3d, 0x71, 0xde, 0x6f, 0x7f, 0xf3, 0xe6, 0xcd, + 0x9b, 0x37, 0x6f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88, 0x59, 0x9c, 0x06, 0x11, 0x43, 0x85, 0x5c, 0x0a, 0xa0, 0xdd, 0xa9, 0x4a, 0x65, - 0x4e, 0x85, 0xcc, 0x99, 0x84, 0xed, 0x77, 0x60, 0x59, 0x2d, 0x19, 0xef, 0x2c, 0x73, 0xe5, 0x5c, - 0x32, 0xc9, 0x4a, 0x6d, 0xa2, 0x12, 0xec, 0x6d, 0x73, 0x3d, 0x29, 0xaa, 0x4e, 0x0a, 0x2d, 0x58, - 0x90, 0x4e, 0x1f, 0x4f, 0x8d, 0x8a, 0xbc, 0x2a, 0x4f, 0x64, 0xfb, 0x31, 0x5c, 0x4a, 0x47, 0x3c, - 0x6b, 0x27, 0x63, 0xda, 0x50, 0x21, 0x95, 0x26, 0x56, 0x5b, 0x13, 0x19, 0x41, 0xd1, 0x55, 0x26, - 0xd4, 0x4c, 0xfb, 0x6e, 0xd6, 0x50, 0xdd, 0x99, 0x84, 0x95, 0x95, 0x09, 0x2b, 0x06, 0x25, 0x89, - 0x55, 0x48, 0x81, 0x8c, 0xa1, 0xb6, 0xfd, 0x10, 0x56, 0x92, 0xc1, 0xb4, 0xef, 0x71, 0xb6, 0x7a, - 0x53, 0xe6, 0x26, 0x39, 0x45, 0x89, 0xe8, 0x04, 0x2a, 0xb8, 0xcc, 0x45, 0x4d, 0x82, 0xfd, 0x01, - 0x5c, 0x99, 0xd2, 0xa4, 0x57, 0x85, 0x5b, 0x62, 0x40, 0xed, 0x8a, 0x14, 0xb0, 0x6f, 0xc3, 0x82, - 0x19, 0x42, 0x26, 0x8e, 0x13, 0xf7, 0x52, 0x7b, 0x76, 0x5d, 0x60, 0x3f, 0x81, 0xab, 0x13, 0xd3, - 0x65, 0xdc, 0xb8, 0x35, 0x39, 0x61, 0xad, 0xbd, 0x9c, 0xa6, 0x64, 0xdd, 0x93, 0xb5, 0x61, 0x17, - 0xca, 0x14, 0xae, 0x6c, 0x07, 0xe6, 0xbb, 0x74, 0xee, 0xcd, 0xb8, 0xb5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x9d, 0x1d, 0x5d, 0x87, 0x60, 0x53, 0x21, 0x77, + 0x28, 0x66, 0x09, 0xb9, 0xa3, 0x90, 0x6d, 0x7d, 0xf8, 0x62, 0x93, 0x90, 0x3b, 0xdb, 0x74, 0xdf, + 0x41, 0xe4, 0xce, 0xb6, 0xfd, 0x63, 0x68, 0xcd, 0xda, 0x62, 0x3a, 0xba, 0x77, 0xa0, 0x1a, 0x13, + 0xe4, 0x89, 0xe9, 0xec, 0x31, 0xa3, 0x5f, 0xca, 0xb6, 0x7f, 0x67, 0xc1, 0x62, 0x2e, 0x26, 0x72, + 0x07, 0x4f, 0x59, 0x1f, 0x3c, 0x75, 0xb0, 0x02, 0x72, 0x46, 0x91, 0x5b, 0x01, 0x4a, 0xc7, 0xe4, + 0x6f, 0x8b, 0x5b, 0xc7, 0x28, 0xa9, 0xfa, 0xa3, 0xca, 0xad, 0x18, 0xa5, 0x2e, 0x4d, 0x6e, 0x81, + 0x5b, 0x5d, 0x94, 0x7a, 0x7a, 0x62, 0x56, 0x8f, 0x0a, 0x3f, 0xe9, 0xc8, 0x91, 0xba, 0xc9, 0x95, + 0xb9, 0x96, 0x70, 0xc4, 0x13, 0x2f, 0xe8, 0xd1, 0xdd, 0xad, 0xcc, 0xa9, 0x6d, 0x0b, 0x75, 0x97, + 0xd6, 0x86, 0x63, 0x86, 0xc6, 0x12, 0x3a, 0x12, 0xf1, 0x68, 0x20, 0x8f, 0xd2, 0x73, 0x31, 0x83, + 0x60, 0xc5, 0xa0, 0x24, 0x1d, 0x36, 0xad, 0x99, 0xdb, 0x8f, 0x18, 0x5c, 0x33, 0x31, 0x81, 0x2e, + 0x4f, 0x7d, 0xc5, 0x30, 0x19, 0x38, 0x5d, 0x31, 0xc8, 0x1c, 0xf9, 0x29, 0x80, 0x76, 0x90, 0xf0, + 0x2c, 0x73, 0x14, 0x67, 0x10, 0xb6, 0x05, 0x05, 0x69, 0x42, 0x63, 0xed, 0x6c, 0x1b, 0x0e, 0x43, + 0x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73, 0x55, 0xbd, + 0x35, 0xf3, 0x9a, 0x96, 0x51, 0xf6, 0x0c, 0x2e, 0x4c, 0xdc, 0x56, 0xd8, 0xda, 0x74, 0x9f, 0xdc, + 0x05, 0xac, 0xb5, 0x7e, 0x36, 0x21, 0xd1, 0xfb, 0x93, 0xcc, 0xdd, 0xcf, 0xdc, 0x82, 0xde, 0xac, + 0xd9, 0x3e, 0x8b, 0x90, 0xb5, 0xb9, 0xfd, 0x31, 0x34, 0x3a, 0x32, 0x12, 0x8e, 0xef, 0x05, 0x7d, + 0x13, 0x31, 0x77, 0xa1, 0xa2, 0x1f, 0x3a, 0xbf, 0xe9, 0x0a, 0x6f, 0x5b, 0xed, 0x3f, 0x5b, 0x30, + 0x6f, 0x62, 0xf8, 0xf9, 0xcc, 0x4a, 0xc5, 0x3e, 0xef, 0xfc, 0xd6, 0x03, 0xbc, 0x7d, 0x2e, 0x27, + 0x1b, 0x07, 0x69, 0xe6, 0xcc, 0x2c, 0xde, 0x54, 0x6e, 0xcf, 0xc4, 0xc1, 0x74, 0xaa, 0xb5, 0xe7, + 0x76, 0x9b, 0x5f, 0xbe, 0x5a, 0xb5, 0xbe, 0x7a, 0xb5, 0x6a, 0xfd, 0xeb, 0xd5, 0xaa, 0xf5, 0x9b, + 0xd7, 0xab, 0x73, 0x5f, 0xbd, 0x5e, 0x9d, 0xfb, 0xc7, 0xeb, 0xd5, 0xb9, 0x6e, 0x85, 0xfe, 0xfb, + 0x78, 0xff, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x74, 0x3c, 0x08, 0x7c, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2962,7 +2961,6 @@ var _Pusher_serviceDesc = grpc.ServiceDesc{ type MetricsGeneratorClient interface { PushSpans(ctx context.Context, in *PushSpansRequest, opts ...grpc.CallOption) (*PushResponse, error) GetMetrics(ctx context.Context, in *SpanMetricsRequest, opts ...grpc.CallOption) (*SpanMetricsResponse, error) - QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryRangeResponse, error) } type metricsGeneratorClient struct { @@ -2991,20 +2989,10 @@ func (c *metricsGeneratorClient) GetMetrics(ctx context.Context, in *SpanMetrics return out, nil } -func (c *metricsGeneratorClient) QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (*QueryRangeResponse, error) { - out := new(QueryRangeResponse) - err := c.cc.Invoke(ctx, "/tempopb.MetricsGenerator/QueryRange", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MetricsGeneratorServer is the server API for MetricsGenerator service. type MetricsGeneratorServer interface { PushSpans(context.Context, *PushSpansRequest) (*PushResponse, error) GetMetrics(context.Context, *SpanMetricsRequest) (*SpanMetricsResponse, error) - QueryRange(context.Context, *QueryRangeRequest) (*QueryRangeResponse, error) } // UnimplementedMetricsGeneratorServer can be embedded to have forward compatible implementations. @@ -3017,9 +3005,6 @@ func (*UnimplementedMetricsGeneratorServer) PushSpans(ctx context.Context, req * func (*UnimplementedMetricsGeneratorServer) GetMetrics(ctx context.Context, req *SpanMetricsRequest) (*SpanMetricsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") } -func (*UnimplementedMetricsGeneratorServer) QueryRange(ctx context.Context, req *QueryRangeRequest) (*QueryRangeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryRange not implemented") -} func RegisterMetricsGeneratorServer(s *grpc.Server, srv MetricsGeneratorServer) { s.RegisterService(&_MetricsGenerator_serviceDesc, srv) @@ -3061,24 +3046,6 @@ func _MetricsGenerator_GetMetrics_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _MetricsGenerator_QueryRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRangeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsGeneratorServer).QueryRange(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tempopb.MetricsGenerator/QueryRange", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsGeneratorServer).QueryRange(ctx, req.(*QueryRangeRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _MetricsGenerator_serviceDesc = grpc.ServiceDesc{ ServiceName: "tempopb.MetricsGenerator", HandlerType: (*MetricsGeneratorServer)(nil), @@ -3091,10 +3058,6 @@ var _MetricsGenerator_serviceDesc = grpc.ServiceDesc{ MethodName: "GetMetrics", Handler: _MetricsGenerator_GetMetrics_Handler, }, - { - MethodName: "QueryRange", - Handler: _MetricsGenerator_QueryRange_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/tempopb/tempo.proto", diff --git a/pkg/tempopb/tempo.proto b/pkg/tempopb/tempo.proto index 4328f386596..81f1c57b266 100644 --- a/pkg/tempopb/tempo.proto +++ b/pkg/tempopb/tempo.proto @@ -16,7 +16,6 @@ service Pusher { service MetricsGenerator { rpc PushSpans(PushSpansRequest) returns (PushResponse) {} rpc GetMetrics(SpanMetricsRequest) returns (SpanMetricsResponse) {} - rpc QueryRange(QueryRangeRequest) returns (QueryRangeResponse) {} } service Querier { From 77e85c9eca7c752656c0e605135c655fc3931440 Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Tue, 12 Dec 2023 15:41:10 -0500 Subject: [PATCH 4/9] Oops forgot to install gofumpt on new computer --- pkg/traceql/engine_metrics.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkg/traceql/engine_metrics.go b/pkg/traceql/engine_metrics.go index b35298d0827..aeb98da14b6 100644 --- a/pkg/traceql/engine_metrics.go +++ b/pkg/traceql/engine_metrics.go @@ -17,7 +17,6 @@ import ( ) func DefaultQueryRangeStep(start, end uint64) uint64 { - delta := time.Duration(end - start) // Try to get this many data points @@ -65,7 +64,7 @@ const maxGroupBys = 5 // TODO - Delete me type FastValues [maxGroupBys]Static type TimeSeries struct { - //Labels LabelSet + // Labels LabelSet Labels labels.Labels Values []float64 } @@ -206,7 +205,6 @@ func NewGroupingAggregator(aggName string, innerAgg func() RangeAggregator, by [ } func (g *GroupingAggregator) Observe(span Span) { - // Get grouping values for i, lookups := range g.byLookups { g.buf[i] = lookup(lookups, span) @@ -391,8 +389,8 @@ func (e *Engine) CompileMetricsQueryRange(req *tempopb.QueryRangeRequest, dedupe // TODO - Make this dynamic since it can be faster to skip // the trace-level timestamp check when all or most of the traces // overlap the window. - //storageReq.StartTimeUnixNanos = req.Start - //storageReq.EndTimeUnixNanos = req.End // Should this be exclusive? + // storageReq.StartTimeUnixNanos = req.Start + // storageReq.EndTimeUnixNanos = req.End // Should this be exclusive? // (2) Only include spans that started in this time frame. // This is checked inside the evaluator me.checkTime = true @@ -424,7 +422,7 @@ type MetricsEvalulator struct { start, end uint64 checkTime bool dedupeSpans bool - //deduper *SpanBloomDeduper + // deduper *SpanBloomDeduper deduper *SpanDeduper2 storageReq *FetchSpansRequest metricsPipeline metricsFirstStageElement @@ -444,7 +442,7 @@ func (e *MetricsEvalulator) Do(ctx context.Context, f SpansetFetcher) error { if e.dedupeSpans && e.deduper == nil { e.deduper = NewSpanDeduper2() - //e.deduper = NewSpanBloomDeduper() + // e.deduper = NewSpanBloomDeduper() } defer fetch.Results.Close() @@ -590,7 +588,6 @@ func NewSpanDeduper2() *SpanDeduper2 { } func (d *SpanDeduper2) Skip(tid []byte, startTime uint64) bool { - d.h.Reset() d.h.Write([]byte(tid)) binary.BigEndian.PutUint64(d.buf, startTime) From 102f1281f002c3e44306bfd56b06bf44f62eaed7 Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Tue, 12 Dec 2023 16:07:58 -0500 Subject: [PATCH 5/9] lint and clean up --- pkg/traceql/engine_metrics.go | 90 ++++------------------------------- 1 file changed, 8 insertions(+), 82 deletions(-) diff --git a/pkg/traceql/engine_metrics.go b/pkg/traceql/engine_metrics.go index aeb98da14b6..48acd27235c 100644 --- a/pkg/traceql/engine_metrics.go +++ b/pkg/traceql/engine_metrics.go @@ -226,15 +226,15 @@ func (g *GroupingAggregator) Observe(span Span) { func (g *GroupingAggregator) labelsFor(vals FastValues) labels.Labels { b := labels.NewBuilder(nil) - any := false + present := false for i, v := range vals { if v.Type != TypeNil { b.Set(g.by[i].String(), v.EncodeToString(false)) - any = true + present = true } } - if !any { + if !present { // Force at least 1 label or else this series is displayed weird b.Set(g.by[0].String(), "") } @@ -352,7 +352,7 @@ func (e *Engine) CompileMetricsQueryRange(req *tempopb.QueryRangeRequest, dedupe // (1) Evalulate the query for any overlapping trace // (2) For any matching spans: only include the ones that started in this time frame. // This will increase redundant trace evalulation, but it ensures that matching spans are - // gauranteed to be found and included in the metrcs. + // guaranteed to be found and included in the metrcs. startTime := NewIntrinsic(IntrinsicSpanStartTime) if !storageReq.HasAttribute(startTime) { if storageReq.AllConditions { @@ -419,10 +419,9 @@ func lookup(needles []Attribute, haystack Span) Static { } type MetricsEvalulator struct { - start, end uint64 - checkTime bool - dedupeSpans bool - // deduper *SpanBloomDeduper + start, end uint64 + checkTime bool + dedupeSpans bool deduper *SpanDeduper2 storageReq *FetchSpansRequest metricsPipeline metricsFirstStageElement @@ -442,7 +441,6 @@ func (e *MetricsEvalulator) Do(ctx context.Context, f SpansetFetcher) error { if e.dedupeSpans && e.deduper == nil { e.deduper = NewSpanDeduper2() - // e.deduper = NewSpanBloomDeduper() } defer fetch.Results.Close() @@ -490,78 +488,6 @@ func (e *MetricsEvalulator) Results() (SeriesSet, error) { return e.metricsPipeline.result(), nil } -// SpanDeduper using sharded maps in-memory. So far this is the most -// performant. We are effectively only using the bottom 5 bytes of -// every span ID. Byte [3] is used to select a sharded map and the -// next 4 are the uint32 within that map. Is this good enough? Maybe... let's find out! -/*type SpanDeduper struct { - m []map[uint32]struct{} -} - -func NewSpanDeduper() *SpanDeduper { - maps := make([]map[uint32]struct{}, 256) - for i := range maps { - maps[i] = make(map[uint32]struct{}, 1000) - } - return &SpanDeduper{ - m: maps, - } -} - -func (d *SpanDeduper) Skip(id []byte) bool { - if len(id) != 8 { - return false - } - - m := d.m[id[3]] - v := binary.BigEndian.Uint32(id[4:8]) - - if _, ok := m[v]; ok { - return true - } - - m[v] = struct{}{} - return false -}*/ - -/* -// This dedupes span IDs using a chain of bloom filters. I thought it -// was going to be awesome but it is WAY TOO SLOW -type SpanBloomDeduper struct { - blooms []*bloom.BloomFilter - count int -} - -func NewSpanBloomDeduper() *SpanBloomDeduper { - //first := bloom.NewWithEstimates(1_000_000, 0.001) - first := bloom.New(999499917, 1) - - return &SpanBloomDeduper{ - blooms: []*bloom.BloomFilter{first}, - } -} - -func (d *SpanBloomDeduper) Skip(id []byte) bool { - - for _, b := range d.blooms { - if b.Test(id) { - return true - } - } - - d.count++ - if d.count%1_000_000 == 0 { - // Time for another filter - //d.blooms = append(d.blooms, bloom.NewWithEstimates(1_000_000, 0.001)) - d.blooms = append(d.blooms, bloom.New(999499917, 1)) - } - - // Set in latest filter - d.blooms[len(d.blooms)-1].Add(id) - - return false -}*/ - // SpanDeduper2 is EXTREMELY LAZY. It attempts to dedupe spans for metrics // without requiring any new data fields. It uses trace ID and span start time // which are already loaded. This of course terrible, but did I mention that @@ -589,7 +515,7 @@ func NewSpanDeduper2() *SpanDeduper2 { func (d *SpanDeduper2) Skip(tid []byte, startTime uint64) bool { d.h.Reset() - d.h.Write([]byte(tid)) + d.h.Write(tid) binary.BigEndian.PutUint64(d.buf, startTime) d.h.Write(d.buf) From c378c8522350c02ca6a96d65499468d2fe22b12b Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Tue, 12 Dec 2023 16:24:31 -0500 Subject: [PATCH 6/9] update mod --- cmd/tempo-serverless/cloud-run/go.mod | 2 ++ cmd/tempo-serverless/cloud-run/go.sum | 4 ++++ cmd/tempo-serverless/lambda/go.mod | 2 ++ cmd/tempo-serverless/lambda/go.sum | 4 ++++ go.mod | 2 +- 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cmd/tempo-serverless/cloud-run/go.mod b/cmd/tempo-serverless/cloud-run/go.mod index bc0a511c391..472f230ab8e 100644 --- a/cmd/tempo-serverless/cloud-run/go.mod +++ b/cmd/tempo-serverless/cloud-run/go.mod @@ -64,6 +64,7 @@ require ( github.com/gorilla/mux v1.8.1 // indirect github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f // indirect github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect + github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -133,6 +134,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.15.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.18.0 // indirect golang.org/x/oauth2 v0.14.0 // indirect diff --git a/cmd/tempo-serverless/cloud-run/go.sum b/cmd/tempo-serverless/cloud-run/go.sum index f29be271a07..d860e7b7930 100644 --- a/cmd/tempo-serverless/cloud-run/go.sum +++ b/cmd/tempo-serverless/cloud-run/go.sum @@ -270,6 +270,8 @@ github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f h1:gyojr97YeWZ70pKNa github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 h1:/of8Z8taCPftShATouOrBVy6GaTTjgQd/VfNiZp/VXQ= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= +github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db h1:7aN5cccjIqCLTzedH7MZzRZt5/lsAHch6Z3L2ZGn5FA= +github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= @@ -528,6 +530,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/cmd/tempo-serverless/lambda/go.mod b/cmd/tempo-serverless/lambda/go.mod index 512fba44a33..3cbea0b06b0 100644 --- a/cmd/tempo-serverless/lambda/go.mod +++ b/cmd/tempo-serverless/lambda/go.mod @@ -67,6 +67,7 @@ require ( github.com/gorilla/mux v1.8.1 // indirect github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f // indirect github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect + github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -137,6 +138,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.15.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.18.0 // indirect golang.org/x/oauth2 v0.14.0 // indirect diff --git a/cmd/tempo-serverless/lambda/go.sum b/cmd/tempo-serverless/lambda/go.sum index 493032cfb6b..889690b840e 100644 --- a/cmd/tempo-serverless/lambda/go.sum +++ b/cmd/tempo-serverless/lambda/go.sum @@ -274,6 +274,8 @@ github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f h1:gyojr97YeWZ70pKNa github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 h1:/of8Z8taCPftShATouOrBVy6GaTTjgQd/VfNiZp/VXQ= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= +github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db h1:7aN5cccjIqCLTzedH7MZzRZt5/lsAHch6Z3L2ZGn5FA= +github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= @@ -536,6 +538,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/go.mod b/go.mod index 2327cafc777..8863910b994 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/prometheus/client_model v0.5.0 github.com/prometheus/common v0.45.0 github.com/prometheus/prometheus v0.47.2 - github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/prometheus/statsd_exporter v0.22.7 github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e github.com/sirupsen/logrus v1.9.3 // indirect github.com/sony/gobreaker v0.4.1 From 02942d489d429f0e128577df15ebdb557d721970 Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Wed, 13 Dec 2023 07:21:16 -0500 Subject: [PATCH 7/9] Fix serverless module references --- cmd/tempo-serverless/cloud-run/go.mod | 2 +- cmd/tempo-serverless/cloud-run/go.sum | 4 ++-- cmd/tempo-serverless/lambda/go.mod | 2 +- cmd/tempo-serverless/lambda/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/tempo-serverless/cloud-run/go.mod b/cmd/tempo-serverless/cloud-run/go.mod index 472f230ab8e..a9e5b7f7cac 100644 --- a/cmd/tempo-serverless/cloud-run/go.mod +++ b/cmd/tempo-serverless/cloud-run/go.mod @@ -104,7 +104,7 @@ require ( github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 // indirect + github.com/prometheus/prometheus v0.47.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rs/xid v1.5.0 // indirect github.com/segmentio/encoding v0.3.6 // indirect diff --git a/cmd/tempo-serverless/cloud-run/go.sum b/cmd/tempo-serverless/cloud-run/go.sum index d860e7b7930..40c056196e0 100644 --- a/cmd/tempo-serverless/cloud-run/go.sum +++ b/cmd/tempo-serverless/cloud-run/go.sum @@ -404,8 +404,8 @@ github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 h1: github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97/go.mod h1:LoBCZeRh+5hX+fSULNyFnagYlQG/gBsyA/deNzROkq8= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 h1:etRZv4bJf9YAuyPWbyFufjkijfeoPSmyA5xNcd4DoyI= -github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3/go.mod h1:plwr4+63Q1xL8oIdBDeU854um7Cct0Av8dhP44lutMw= +github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= +github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= diff --git a/cmd/tempo-serverless/lambda/go.mod b/cmd/tempo-serverless/lambda/go.mod index 3cbea0b06b0..15d0914dea4 100644 --- a/cmd/tempo-serverless/lambda/go.mod +++ b/cmd/tempo-serverless/lambda/go.mod @@ -108,7 +108,7 @@ require ( github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 // indirect + github.com/prometheus/prometheus v0.47.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rs/xid v1.5.0 // indirect github.com/segmentio/encoding v0.3.6 // indirect diff --git a/cmd/tempo-serverless/lambda/go.sum b/cmd/tempo-serverless/lambda/go.sum index 889690b840e..fb0078767a9 100644 --- a/cmd/tempo-serverless/lambda/go.sum +++ b/cmd/tempo-serverless/lambda/go.sum @@ -408,8 +408,8 @@ github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 h1: github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97/go.mod h1:LoBCZeRh+5hX+fSULNyFnagYlQG/gBsyA/deNzROkq8= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3 h1:etRZv4bJf9YAuyPWbyFufjkijfeoPSmyA5xNcd4DoyI= -github.com/prometheus/prometheus v1.8.2-0.20221021121301-51a44e6657c3/go.mod h1:plwr4+63Q1xL8oIdBDeU854um7Cct0Av8dhP44lutMw= +github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= +github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= From a6fa0531ee21cdcb753da4ece8fffdbfb7e01cfa Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Wed, 13 Dec 2023 07:55:10 -0500 Subject: [PATCH 8/9] comments --- pkg/traceql/engine_metrics.go | 54 ++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/pkg/traceql/engine_metrics.go b/pkg/traceql/engine_metrics.go index 48acd27235c..1e36585bc54 100644 --- a/pkg/traceql/engine_metrics.go +++ b/pkg/traceql/engine_metrics.go @@ -60,16 +60,13 @@ func IntervalOf(ts, start, end, step uint64) int { return int((ts - start) / step) } -const maxGroupBys = 5 // TODO - Delete me -type FastValues [maxGroupBys]Static - type TimeSeries struct { - // Labels LabelSet Labels labels.Labels Values []float64 } -// TODO - Make an analog of me in tempopb proto for over-the-wire transmission +// SeriesSet is a set of unique timeseries. They are mapped by the "Prometheus"-style +// text description: {x="a",y="b"} type SeriesSet map[string]TimeSeries // VectorAggregator turns a vector of spans into a single numeric scalar @@ -162,6 +159,16 @@ func (s *StepAggregator) Samples() []float64 { return ss } +const maxGroupBys = 5 // TODO - This isn't ideal but see comment below. + +// FastValues is an array of attribute values (static values) that can be used +// as a map key. This offers good performance and works with native Go maps and +// has no chance for collisions (whereas a hash32 has a non-zero chance of +// collisions). However it means we have to arbitrarily set an upper limit on +// the maximum number of values. +type FastValues [maxGroupBys]Static + +// GroupingAggregator groups spans into series based on attribute values. type GroupingAggregator struct { // Config by []Attribute // Original attributes: .foo @@ -187,6 +194,7 @@ func NewGroupingAggregator(aggName string, innerAgg func() RangeAggregator, by [ for i, attr := range by { if attr.Intrinsic == IntrinsicNone && attr.Scope == AttributeScopeNone { // Unscoped attribute. Check span-level, then resource-level. + // TODO - Is this taken care of by span.AttributeFor now? lookups[i] = []Attribute{ NewScopedAttribute(AttributeScopeSpan, false, attr.Name), NewScopedAttribute(AttributeScopeResource, false, attr.Name), @@ -204,8 +212,11 @@ func NewGroupingAggregator(aggName string, innerAgg func() RangeAggregator, by [ } } +// Observe the span by looking up its group-by attributes, mapping to the series, +// and passing to the inner aggregate. This is a critical hot path. func (g *GroupingAggregator) Observe(span Span) { // Get grouping values + // Reuse same buffer for i, lookups := range g.byLookups { g.buf[i] = lookup(lookups, span) } @@ -219,10 +230,34 @@ func (g *GroupingAggregator) Observe(span Span) { agg.Observe(span) } -// labelsFor gives the final labels for the series. Slower and can't be on the hot path. -// This is tweaked to match what prometheus does. For grouped metrics we don't -// include the metric name, just the group labels. -// rate() by (x) => {x=a}, {x=b}, ... +// labelsFor gives the final labels for the series. Slower and not on the hot path. +// This is tweaked to match what prometheus does where possible with an exception. +// In the case of all values missing. +// (1) Standard case: a label is created for each group-by value in the series: +// +// Ex: rate() by (x,y) can yield: +// {x=a,y=b} +// {x=c,y=d} +// etc +// +// (2) Nils are dropped. A nil can be present for any label, so any combination +// of the remaining labels is possible. Label order is preserved. +// +// Ex: rate() by (x,y,z) can yield all of these combinations: +// {x=..., y=..., z=...} +// {x=..., z=...} +// {x=... } +// { y=..., z=...} +// { y=... } +// etc +// +// (3) Exceptional case: All Nils. Real Prometheus-style metrics have a name, so there is +// always at least 1 label. Not so here. We have to force at least 1 label or else things +// may not be handled correctly downstream. In this case we take the first label and +// make it the string "nil" +// +// Ex: rate() by (x,y,z) and all nil yields: +// {x="nil"} func (g *GroupingAggregator) labelsFor(vals FastValues) labels.Labels { b := labels.NewBuilder(nil) @@ -235,7 +270,6 @@ func (g *GroupingAggregator) labelsFor(vals FastValues) labels.Labels { } if !present { - // Force at least 1 label or else this series is displayed weird b.Set(g.by[0].String(), "") } From 112a2ebaa1d18b96f2cd536ebc49e198a2701c18 Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Wed, 13 Dec 2023 08:20:32 -0500 Subject: [PATCH 9/9] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index beef20e859c..f97f17b4029 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## main / unreleased +* [FEATURE] TraceQL metrics queries [#3227](https://github.com/grafana/tempo/pull/3227) (@mdisibio @zalegrala) * [BUGFIX] Change exit code if config is successfully verified [#3174](https://github.com/grafana/tempo/pull/3174) (@am3o @agrib-01) * [BUGFIX] The tempo-cli analyse blocks command no longer fails on compacted blocks [#3183](https://github.com/grafana/tempo/pull/3183) (@stoewer) * [BUGFIX] Move waitgroup handling for poller error condition [#3224](https://github.com/grafana/tempo/pull/3224) (@zalegrala)