Skip to content

Commit 5be56a2

Browse files
committed
cp dines
1 parent 988a516 commit 5be56a2

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

cmd/overlaybd-snapshotter/main.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,12 @@ var pconfig *overlaybd.BootConfig
4848
var commitID string = "unknown"
4949

5050
func requestIDInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
51-
// Check if request ID is already in baggage (from upstream call)
5251
requestID := tracing.GetRequestID(ctx)
5352
if requestID == "" {
54-
// Generate new request ID if not present
5553
requestID = mylog.GenerateRequestID()
56-
// Set it in baggage for downstream propagation
57-
ctx = tracing.SetRequestID(ctx, requestID)
5854
}
5955

60-
// Set in local logger context
6156
ctx = mylog.WithRequestID(ctx, requestID)
62-
63-
// Add to containerd's logger context
6457
ctx = log.WithLogger(ctx, log.G(ctx).WithField("req_id", requestID))
6558

6659
return handler(ctx, req)

0 commit comments

Comments
 (0)