【问题标题】:Integrate Application Insight with Service Fabric Stateless WebAPI将 Application Insight 与 Service Fabric 无状态 WebAPI 集成
【发布时间】:2017-09-25 16:24:01
【问题描述】:

我们如何将 Application Insight 与 Service Fabric Stateless WebAPI 集成? 我们需要为它配置单独的Listener吗?

【问题讨论】:

    标签: azure-service-fabric


    【解决方案1】:

    我为带有 Owin 托管的完整 .NET Framework 制作了一个服务结构示例应用程序。该示例包括依赖注入和应用程序洞察力 https://github.com/duongthaiha/ServiceFarbricSampleApplication

    【讨论】:

      【解决方案2】:

      添加 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'ssome更多documentation这个。

      【讨论】:

      • 感谢您的回答....但具体来说,我使用的是无状态 WebAPI,但是我能够对其进行配置并且工作正常!!!。
      猜你喜欢
      • 2017-10-16
      • 1970-01-01
      • 2016-08-17
      • 2021-01-09
      • 2019-07-24
      • 2016-11-16
      • 2021-02-01
      • 2017-10-30
      • 2017-04-29
      相关资源
      最近更新 更多