@@ -186,10 +186,10 @@ func (u *BucketStores) syncUsersBlocks(ctx context.Context, f func(context.Conte
186
186
187
187
// Series makes a series request to the underlying user bucket store.
188
188
func (u * BucketStores ) Series (req * storepb.SeriesRequest , srv storepb.Store_SeriesServer ) error {
189
- log , ctx := spanlogger .New (srv .Context (), "BucketStores.Series" )
190
- defer log .Span .Finish ()
189
+ spanLog , spanCtx := spanlogger .New (srv .Context (), "BucketStores.Series" )
190
+ defer spanLog .Span .Finish ()
191
191
192
- userID := getUserIDFromGRPCContext (ctx )
192
+ userID := getUserIDFromGRPCContext (spanCtx )
193
193
if userID == "" {
194
194
return fmt .Errorf ("no userID" )
195
195
}
@@ -199,7 +199,10 @@ func (u *BucketStores) Series(req *storepb.SeriesRequest, srv storepb.Store_Seri
199
199
return nil
200
200
}
201
201
202
- return store .Series (req , srv )
202
+ return store .Series (req , spanSeriesServer {
203
+ Store_SeriesServer : srv ,
204
+ ctx : spanCtx ,
205
+ })
203
206
}
204
207
205
208
func (u * BucketStores ) getStore (userID string ) * store.BucketStore {
@@ -331,3 +334,13 @@ func (r *ReplicaLabelRemover) Modify(_ context.Context, metas map[ulid.ULID]*tha
331
334
}
332
335
return nil
333
336
}
337
+
338
+ type spanSeriesServer struct {
339
+ storepb.Store_SeriesServer
340
+
341
+ ctx context.Context
342
+ }
343
+
344
+ func (s spanSeriesServer ) Context () context.Context {
345
+ return s .ctx
346
+ }
0 commit comments