How Does the eG .NET Core BTM Work?

An ASP.NET Core app runs with an in-process HTTP server implementation. By default, it ships with a Kestrel web server, which is a cross-platform HTTP server implementation. The Kestrel web server listens for HTTP requests and surfaces them to the app as a set of request features composed into an HttpContext.

Kestrel can be used by itself or with a reverse proxy server, such as Apache.

Figure 1 : Kestrel used as an internet-facing web server

A reverse proxy server receives HTTP requests from the network and forwards them to Kestrel.

Figure 2 : A reverse proxy forwarding requests to Kestrel

Besides Kestrel, IIS web servers too support the .NET Core framework.

The eG .NET Core BTM is currently capable of monitoring transactions to web sites / web applications hosted on Kestrel web servers and IIS web servers.

To be able to track the live transactions to web sites on an Kestrel / IIS web server, eG Enterprise requires that a special eG .NET Core Profiler be deployed on that Kestrel / IIS web server.

If more Kestrel / IIS web servers are in the transaction path, then, the profiler will have to be installed on each of the web servers, for end-to-end visibility.

Typically, the requests to web site transactions are handled by dotnet.exe on a Kestrel / IIS web server. Whenever an end-user requests for a transaction, the Kestrel / IIS web server spawns a worker process (dotnet.exe) to service that transaction request. Upon receipt of a request, the worker process automatically invokes an instance of the .NET Core CLR to process the request. At the same time, the worker process also loads an instance of the .NET Core profiler.

Once the profiler latches on to a worker process, it injects a .NET Core code into the .NET Core application code. The injected code adds a GUID to each unique transaction to the application, and performs the following tasks:

  • Traces the path of a transaction.

  • Measures the responsiveness of a transaction by computing the time difference between when the transaction started and when it ended.

  • Identifies the slow, stalled, and error transactions, and computes the count of such transactions.

  • Discovers the exit calls made by a transaction from the kestrel web server, determines the destination of the calls, and measures the average time taken by each call to process the requests for a transaction.

The profiler then sends all these statistics to the eG agent.

The eG agent reports these metrics to the eG manager. The eG manager associates these metrics with the .NET Core Transactions layer of the target Kestrel web server and/or the .NET Transactions layer of the IIS web server, and displays them in the eG monitoring console.