insert request id in context #100

Merged
vtolstov merged 1 commits from rq into v3 2023-08-23 16:32:39 +03:00

View File

@ -40,10 +40,11 @@ var DefaultMetadataFunc = func(ctx context.Context) (context.Context, error) {
}
imd.Set(DefaultMetadataKey, v)
omd.Set(DefaultMetadataKey, v)
ctx = context.WithValue(ctx, XRequestIDKey, v)
ctx = metadata.NewIncomingContext(ctx, imd)
ctx = metadata.NewOutgoingContext(ctx, omd)
return context.WithValue(ctx, XRequestIDKey, v), nil
return ctx, nil
}
type wrapper struct {