2017-09-23 47 views

回答

0

添加NuGet包:Microsoft.ApplicationInsights.ServiceFabric.Native

,將其配置:

var host = new WebHostBuilder() 
     // Adding Service Fabric Telemetry Initializer 
     .ConfigureServices(services => services.AddSingleton<ITelemetryInitializer>((serviceProvider) => new FabricTelemetryInitializer())) 
     // Configuring Applciation Insights 
     .UseApplicationInsights() 
     .Build(); 
     host.Run(); 

Here'ssomedocumentation這一點。

+0

感謝您的答案....但具體而言,我使用無狀態WebAPI,但我能夠配置它,它工作正常! – Pushkar