@@ -25,6 +25,7 @@ import (
2525 "google.golang.org/grpc/codes"
2626 "google.golang.org/grpc/status"
2727
28+ "github.com/cortexproject/cortex/pkg/util/spanlogger"
2829 "github.com/cortexproject/cortex/pkg/util/validation"
2930)
3031
@@ -73,12 +74,14 @@ func (p *parquetBucketStore) findParquetBlocks(ctx context.Context, blockMatcher
7374
7475// Series implements the store interface for a single parquet bucket store
7576func (p * parquetBucketStore ) Series (req * storepb.SeriesRequest , srv storepb.Store_SeriesServer ) (err error ) {
77+ spanLog , ctx := spanlogger .New (srv .Context (), "ParquetBucketStore.Series" )
78+ defer spanLog .Finish ()
79+
7680 matchers , err := storecache .MatchersToPromMatchersCached (p .matcherCache , req .Matchers ... )
7781 if err != nil {
7882 return status .Error (codes .InvalidArgument , err .Error ())
7983 }
8084
81- ctx := srv .Context ()
8285 resHints := & hintspb.SeriesResponseHints {}
8386 var anyHints * types.Any
8487
@@ -158,6 +161,9 @@ func (p *parquetBucketStore) Series(req *storepb.SeriesRequest, srv storepb.Stor
158161
159162// LabelNames implements the store interface for a single parquet bucket store
160163func (p * parquetBucketStore ) LabelNames (ctx context.Context , req * storepb.LabelNamesRequest ) (* storepb.LabelNamesResponse , error ) {
164+ spanLog , ctx := spanlogger .New (ctx , "ParquetBucketStore.LabelNames" )
165+ defer spanLog .Finish ()
166+
161167 matchers , err := storecache .MatchersToPromMatchersCached (p .matcherCache , req .Matchers ... )
162168 if err != nil {
163169 return nil , status .Error (codes .InvalidArgument , err .Error ())
@@ -213,6 +219,9 @@ func (p *parquetBucketStore) LabelNames(ctx context.Context, req *storepb.LabelN
213219
214220// LabelValues implements the store interface for a single parquet bucket store
215221func (p * parquetBucketStore ) LabelValues (ctx context.Context , req * storepb.LabelValuesRequest ) (* storepb.LabelValuesResponse , error ) {
222+ spanLog , ctx := spanlogger .New (ctx , "ParquetBucketStore.LabelValues" )
223+ defer spanLog .Finish ()
224+
216225 matchers , err := storecache .MatchersToPromMatchersCached (p .matcherCache , req .Matchers ... )
217226 if err != nil {
218227 return nil , status .Error (codes .InvalidArgument , err .Error ())
0 commit comments