ms application insights - Dependency Tracking when using Task.Run in ASP.NET -


i have requirement use task.run(...) force non-async code run in parallel other async code.

   var task1 = task.run(() => synchronous code);    var task2 = await dosomethingasync();     await task.whenall(task1, task2); 

the dependency calls in sync synchronous code not being tracked. seems application insights sdk (2.4) uses system.diagnostics.activity. there way create new activity start/stop in synchronous code, activity.current setup , dependency telemetry associated correct parent?

ps cannot change synchronous code asynchronous. calling microsoft crm , crm sdk functions using not have asynchronous versions.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -