@@ -155,7 +155,7 @@ func (c *store) Put(ctx context.Context, chunks []Chunk) error {
155155
156156// PutOne implements Store
157157func (c * store ) PutOne (ctx context.Context , from , through model.Time , chunk Chunk ) error {
158- log , ctx := spanlogger .New (ctx , "ChunkStore.PutOne" )
158+ log , ctx := spanlogger .New (ctx , util_log . Logger , "ChunkStore.PutOne" )
159159 defer log .Finish ()
160160 chunks := []Chunk {chunk }
161161
@@ -205,7 +205,7 @@ func (c *store) calculateIndexEntries(userID string, from, through model.Time, c
205205
206206// Get implements Store
207207func (c * store ) Get (ctx context.Context , userID string , from , through model.Time , allMatchers ... * labels.Matcher ) ([]Chunk , error ) {
208- log , ctx := spanlogger .New (ctx , "ChunkStore.Get" )
208+ log , ctx := spanlogger .New (ctx , util_log . Logger , "ChunkStore.Get" )
209209 defer log .Span .Finish ()
210210 level .Debug (log ).Log ("from" , from , "through" , through , "matchers" , len (allMatchers ))
211211
@@ -227,7 +227,7 @@ func (c *store) GetChunkRefs(ctx context.Context, userID string, from, through m
227227
228228// LabelValuesForMetricName retrieves all label values for a single label name and metric name.
229229func (c * baseStore ) LabelValuesForMetricName (ctx context.Context , userID string , from , through model.Time , metricName , labelName string ) ([]string , error ) {
230- log , ctx := spanlogger .New (ctx , "ChunkStore.LabelValues" )
230+ log , ctx := spanlogger .New (ctx , util_log . Logger , "ChunkStore.LabelValues" )
231231 defer log .Span .Finish ()
232232 level .Debug (log ).Log ("from" , from , "through" , through , "metricName" , metricName , "labelName" , labelName )
233233
@@ -261,7 +261,7 @@ func (c *baseStore) LabelValuesForMetricName(ctx context.Context, userID string,
261261
262262// LabelNamesForMetricName retrieves all label names for a metric name.
263263func (c * store ) LabelNamesForMetricName (ctx context.Context , userID string , from , through model.Time , metricName string ) ([]string , error ) {
264- log , ctx := spanlogger .New (ctx , "ChunkStore.LabelNamesForMetricName" )
264+ log , ctx := spanlogger .New (ctx , util_log . Logger , "ChunkStore.LabelNamesForMetricName" )
265265 defer log .Span .Finish ()
266266 level .Debug (log ).Log ("from" , from , "through" , through , "metricName" , metricName )
267267
@@ -294,7 +294,7 @@ func (c *store) LabelNamesForMetricName(ctx context.Context, userID string, from
294294
295295func (c * baseStore ) validateQueryTimeRange (ctx context.Context , userID string , from * model.Time , through * model.Time ) (bool , error ) {
296296 //nolint:ineffassign,staticcheck //Leaving ctx even though we don't currently use it, we want to make it available for when we might need it and hopefully will ensure us using the correct context at that time
297- log , ctx := spanlogger .New (ctx , "store.validateQueryTimeRange" )
297+ log , ctx := spanlogger .New (ctx , util_log . Logger , "store.validateQueryTimeRange" )
298298 defer log .Span .Finish ()
299299
300300 if * through < * from {
@@ -324,7 +324,7 @@ func (c *baseStore) validateQueryTimeRange(ctx context.Context, userID string, f
324324}
325325
326326func (c * baseStore ) validateQuery (ctx context.Context , userID string , from * model.Time , through * model.Time , matchers []* labels.Matcher ) (string , []* labels.Matcher , bool , error ) {
327- log , ctx := spanlogger .New (ctx , "store.validateQuery" )
327+ log , ctx := spanlogger .New (ctx , util_log . Logger , "store.validateQuery" )
328328 defer log .Span .Finish ()
329329
330330 shortcut , err := c .validateQueryTimeRange (ctx , userID , from , through )
@@ -345,7 +345,7 @@ func (c *baseStore) validateQuery(ctx context.Context, userID string, from *mode
345345}
346346
347347func (c * store ) getMetricNameChunks (ctx context.Context , userID string , from , through model.Time , allMatchers []* labels.Matcher , metricName string ) ([]Chunk , error ) {
348- log , ctx := spanlogger .New (ctx , "ChunkStore.getMetricNameChunks" )
348+ log , ctx := spanlogger .New (ctx , util_log . Logger , "ChunkStore.getMetricNameChunks" )
349349 defer log .Finish ()
350350 level .Debug (log ).Log ("from" , from , "through" , through , "metricName" , metricName , "matchers" , len (allMatchers ))
351351
@@ -380,7 +380,7 @@ func (c *store) getMetricNameChunks(ctx context.Context, userID string, from, th
380380}
381381
382382func (c * store ) lookupChunksByMetricName (ctx context.Context , userID string , from , through model.Time , matchers []* labels.Matcher , metricName string ) ([]Chunk , error ) {
383- log , ctx := spanlogger .New (ctx , "ChunkStore.lookupChunksByMetricName" )
383+ log , ctx := spanlogger .New (ctx , util_log . Logger , "ChunkStore.lookupChunksByMetricName" )
384384 defer log .Finish ()
385385
386386 // Just get chunks for metric if there are no matchers
@@ -448,7 +448,7 @@ func (c *store) lookupChunksByMetricName(ctx context.Context, userID string, fro
448448
449449func (c * baseStore ) lookupIdsByMetricNameMatcher (ctx context.Context , from , through model.Time , userID , metricName string , matcher * labels.Matcher ) ([]string , error ) {
450450 formattedMatcher := formatMatcher (matcher )
451- log , ctx := spanlogger .New (ctx , "Store.lookupIdsByMetricNameMatcher" , "metricName" , metricName , "matcher" , formattedMatcher )
451+ log , ctx := spanlogger .New (ctx , util_log . Logger , "Store.lookupIdsByMetricNameMatcher" , "metricName" , metricName , "matcher" , formattedMatcher )
452452 defer log .Span .Finish ()
453453
454454 var err error
@@ -498,7 +498,7 @@ func formatMatcher(matcher *labels.Matcher) string {
498498}
499499
500500func (c * baseStore ) lookupEntriesByQueries (ctx context.Context , queries []IndexQuery ) ([]IndexEntry , error ) {
501- log , ctx := spanlogger .New (ctx , "store.lookupEntriesByQueries" )
501+ log , ctx := spanlogger .New (ctx , util_log . Logger , "store.lookupEntriesByQueries" )
502502 defer log .Span .Finish ()
503503
504504 // Nothing to do if there are no queries.
0 commit comments