/// <summary> /// Trying this as separate child operation /// </summary> /// <param name="radius"></param> /// <returns></returns> private Task <double> GetAreaTask(double radius, string opId, string parentOpId) { return(Task.Run <double>(() => { var appInsight = new AppInsightLogger(); IOperationHolder <DependencyTelemetry> dep = appInsight.StartOperation <DependencyTelemetry>("GetAreaTask", opId, parentOpId); double area = radius * radius * 3.14; int delay = new Random().Next() % 8000; Log($"Inside GetAreaTask - Going to Delay-{delay}"); Task.Delay(delay).Wait(); Log($"Inside GetAreaTask - Area - {area}"); new AppInsightLogger().StopOperation(dep); return area; })); }