且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ASP.NET Core/MVC6中的WebTelemetryInitializerBase

更新时间:2023-02-14 14:41:31

是的,aspnetcore有此版本.查看 ASP.NET Core应用程序的Microsoft应用程序见解回购.

Yes, there is a version of this for aspnetcore. Check out the Microsoft Application Insights for ASP.NET Core applications repo.

有一个实现可在/src/Microsoft.ApplicationInsights.AspNetCore/TelemetryInitializers/WebUserTelemetryInitializer.cs ,您可以将其用作指南.

There is an implementation of getting the WebUser found in /src/Microsoft.ApplicationInsights.AspNetCore/TelemetryInitializers/WebUserTelemetryInitializer.cs which you can use as a guide.

TelemetryInitializerBase 类是使用

The TelemetryInitializerBase class is the one that consumes the IHttpContextAccessor which is used to get the HttpContext.

从那里您可以获取 查看全文