icorprofilercallback get parent thread id of the a thread

Tom Mac 1 Reputation point
2022-04-05T19:29:05.217+00:00

I'm using icorprofilercallback2 to track the performance of all http requests in my application. I do keep track of methods using the thread ids. The http request is making webservice call to other server. It seems this webservice call gets executed asyncronously in different thread. I'm able to see which method is taking time. But unable to find which http request triggered this webservice call.

Is there a way in which I can profile the complete stack trace of methods triggered by my http request?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,164 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
322 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,245 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,119 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 55,686 Reputation points
    2022-04-05T19:47:08.747+00:00

    there really isn't a parent. .net async handling uses a thread pool. the thread completion callback is also a new thread from the pool. thread handling uses delegates.

    await myAync();
    // new thread here

    0 comments No comments