Telemetry correlation http module enables cross tier telemetry tracking.
Enable diagnostics source listener using code below. Note, some telemetry vendors like Azure Application Insights will enable it automatically.
public class NoopDiagnosticsListener : IObserver<KeyValuePair<string, object>>
{
public void OnCompleted() { }
public void OnError(Exception error) { }
public void OnNext(KeyValuePair<string, object> evnt)
{
}
}
public class NoopSubscriber : IObserver<DiagnosticListener>
{
public void OnCompleted() { }
public void OnError(Exception error) { }
public void OnNext(DiagnosticListener listener)
{
if (listener.Name == "Microsoft.AspNet.TelemetryCorrelation" || listener.Name == "System.Net.Http" )
{
listener.Subscribe(new NoopDiagnosticsListener());
}
}
}
web.config
for your
app.Once enabled - this http module will:
See http protocol specifications for details.
This http module is used by Application Insights. See documentation and code.