Added extension methods for Task ToApm