Skip to content

Commit c34a224

Browse files
committed
add spans
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
1 parent 874e8d1 commit c34a224

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pkg/storegateway/parquet_bucket_stores.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,10 @@ func (u *ParquetBucketStores) Series(req *storepb.SeriesRequest, srv storepb.Sto
153153

154154
// LabelNames implements BucketStores
155155
func (u *ParquetBucketStores) LabelNames(ctx context.Context, req *storepb.LabelNamesRequest) (*storepb.LabelNamesResponse, error) {
156-
userID := getUserIDFromGRPCContext(ctx)
156+
spanLog, spanCtx := spanlogger.New(ctx, "ParquetBucketStores.LabelNames")
157+
defer spanLog.Finish()
158+
159+
userID := getUserIDFromGRPCContext(spanCtx)
157160
if userID == "" {
158161
return nil, fmt.Errorf("no userID")
159162
}
@@ -178,7 +181,10 @@ func (u *ParquetBucketStores) LabelNames(ctx context.Context, req *storepb.Label
178181

179182
// LabelValues implements BucketStores
180183
func (u *ParquetBucketStores) LabelValues(ctx context.Context, req *storepb.LabelValuesRequest) (*storepb.LabelValuesResponse, error) {
181-
userID := getUserIDFromGRPCContext(ctx)
184+
spanLog, spanCtx := spanlogger.New(ctx, "ParquetBucketStores.LabelValues")
185+
defer spanLog.Finish()
186+
187+
userID := getUserIDFromGRPCContext(spanCtx)
182188
if userID == "" {
183189
return nil, fmt.Errorf("no userID")
184190
}

0 commit comments

Comments
 (0)