diff --git a/queryable/parquet_queryable.go b/queryable/parquet_queryable.go index 82176ef..e5518ea 100644 --- a/queryable/parquet_queryable.go +++ b/queryable/parquet_queryable.go @@ -164,6 +164,9 @@ func (p parquetQuerier) LabelValues(ctx context.Context, name string, hints *pro if err != nil { return nil, nil, err } + span.SetAttributes( + attribute.Int("shards_count", len(shards)), + ) limit := int64(0) @@ -212,6 +215,9 @@ func (p parquetQuerier) LabelNames(ctx context.Context, hints *prom_storage.Labe if err != nil { return nil, nil, err } + span.SetAttributes( + attribute.Int("shards_count", len(shards)), + ) limit := int64(0) @@ -281,6 +287,11 @@ func (p parquetQuerier) Select(ctx context.Context, sorted bool, sp *prom_storag minT, maxT = sp.Start, sp.End } skipChunks := sp != nil && sp.Func == "series" + span.SetAttributes( + attribute.Int("shards_count", len(shards)), + attribute.Bool("skip_chunks", skipChunks), + ) + errGroup, ctx := errgroup.WithContext(ctx) errGroup.SetLimit(p.opts.concurrency) @@ -296,11 +307,6 @@ func (p parquetQuerier) Select(ctx context.Context, sorted bool, sp *prom_storag return prom_storage.ErrSeriesSet(err) } - span.SetAttributes( - attribute.Int("shards_count", len(shards)), - attribute.Bool("skip_chunks", skipChunks), - ) - ss := convert.NewMergeChunkSeriesSet(seriesSet, labels.Compare, prom_storage.NewConcatenatingChunkSeriesMerger()) return convert.NewSeriesSetFromChunkSeriesSet(ss, skipChunks) diff --git a/search/constraint_test.go b/search/constraint_test.go index e8b0643..f60fe52 100644 --- a/search/constraint_test.go +++ b/search/constraint_test.go @@ -513,9 +513,9 @@ type mockConstraint struct { pathName string } -func (m *mockConstraint) String() string { return fmt.Sprintf("mock(%s)", m.pathName) } -func (m *mockConstraint) path() string { return m.pathName } -func (m *mockConstraint) init(f *storage.ParquetFile) error { return nil } +func (m *mockConstraint) String() string { return fmt.Sprintf("mock(%s)", m.pathName) } +func (m *mockConstraint) path() string { return m.pathName } +func (m *mockConstraint) init(f storage.ParquetFileView) error { return nil } func (m *mockConstraint) filter(ctx context.Context, rgIdx int, primary bool, rr []RowRange) ([]RowRange, error) { return rr, nil }