Add Application Insight to a existing Azure Service Fabric cluster

守給你的承諾、 提交于 2019-12-30 08:36:09

问题


We have been working on Azure Service Fabric since last 4 months but now have decided to have a unified loging infrastructure for which we are using AppInsight, how can we add a AppInsight Key to a existing Service Fabric cluster


回答1:


I did it this way, using Visual Studio 2017:

  1. Open Cloud Explorer from VS
  2. Expand Virtual Machine Scale Sets
  3. Locate the scale set containing your SF cluster.
  4. Right-click Update diagnostics...
  5. In the dialog, check Send diagnostics to Application Insights and add the Instrumentation key for you AI sink
  6. Click OK and leave the dialogue
  7. You might get an error (I did), but if you re-open the dialog you will find that the settings are still there.
  8. To 'apply' the new settings the the cluster. Open your azure portal, select All resources, and open the Virtual Machine Scale Set
  9. At this point, hopefully selecting Restart will apply the changes to the cluster. I did a Deallocate followed by a Retart and a re-deploy of my SF-application, and this worked (I did not test if just doing a restart would work). However be very careful using this approach, make sure you know the trade-offs when de-allocation a SF-cluster



回答2:


Unfortunately it is not just that simple right now.

The Application Insights support as shown at Build 2017 is still in preview. It consists of two nuget preview packages you have to install and you need to update your cluster to the latest version. Stay tuned to this repo which at the moment shows

Using Service Fabric with Application Insights

We are working on updating this repo to demonstrate how to use Service Fabric with Application Insights. The completed repo is not quite ready, please check back here within the next couple of days!

More information about the setup and nuget packages can be found here:

This repository produces the following two nuget packages:

Microsoft.ApplicationInsights.ServiceFabric.Native - For use with Service Fabric's native reliable services. Microsoft.ApplicationInsights.ServiceFabric - For use with Guest Executable and Guest container services (lift and shift scenarios).

Until that time you can take a look at this repo for full (manual) Application Insights integration.



来源:https://stackoverflow.com/questions/44018499/add-application-insight-to-a-existing-azure-service-fabric-cluster

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!