Skip to content

soenneker/soenneker.applicationinsights.correlator.jwt

Repository files navigation

Soenneker.ApplicationInsights.Correlator.Jwt

A telemetry initializer that adds a request's authorization header

Installation

dotnet add package Soenneker.ApplicationInsights.Correlator.Jwt

Usage

1. Add the following to your Startup.cs file

public void ConfigureServices(IServiceCollection services)
{
    services.AddJwtTelemetryCorrelatorAsSingleton();
}

That's it!

If requests are made with the request headerAuthorization, and have the scheme bearer <token>, Jwt will be visible on the individual requests in Application Insights.