Skip to content

Commit

Permalink
Slight update to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethmugo committed Apr 16, 2024
1 parent 472b9e7 commit 1103377
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Tingle.AspNetCore.ApplicationInsights/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ services.AddHttpContextAccessor();

We've injected the `IHttpContextAccessor` in the DI container so that we can access the `HttpContext` object that contains the HTTP request details.

The request source details will be seen as custom properties of an application insights telemetry record.

## Add all request headers to application insights telemetry

You can send all request headers to application insights by adding the following logic to `Program.cs` or `Startup.cs` file:
Expand All @@ -32,6 +34,8 @@ services.AddHttpContextAccessor();

We've injected the `IHttpContextAccessor` in the DI container so that we can access the `HttpContext` object that contains the HTTP request details.

The request headers will be seen as custom properties of an application insights telemetry record.

## Add manual dependency tracking in application insights

A dependency is a component that's called by your application. It's typically a service called by using HTTP, a database, or a file system. Application Insights measures the duration of dependency calls and whether it's failing or not, along with information like the name of the dependency. You can investigate specific dependency calls and correlate them to requests and exceptions. The list of dependencies that are automatically tracked can be seen [here](https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-dependencies).
Expand Down

0 comments on commit 1103377

Please sign in to comment.