将Application Insight添加到现有的Azure Service Fabric群集 [英] Add Application Insight to a existing Azure Service Fabric cluster
本文介绍了将Application Insight添加到现有的Azure Service Fabric群集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
过去四个月以来,我们一直在研究Azure Service Fabric,但现在已决定拥有一个统一的日志基础结构,我们正在使用该基础结构使用AppInsight,如何将AppInsight密钥添加到现有Service Fabric群集中
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
推荐答案
我是这样使用 Visual Studio 2017 来做到这一点的:
I did it this way, using Visual Studio 2017:
- 从 VS 打开 Cloud Explorer
- 扩展虚拟机规模集
- 找到包含您的SF群集的比例尺集.
- 右键单击更新诊断...
- 在对话框中,选中发送诊断信息到Application Insights ,并为您的AI接收器添加 Instrumentation键.
- 点击确定并退出对话框
- 您可能会收到一个错误(我确实有),但是如果重新打开对话框,您会发现设置仍然存在.
- 要将新设置应用"到集群,请打开您的azure门户,选择所有资源,然后打开虚拟机规模设置
- 这时,希望选择重新启动会将更改应用到集群.我先进行了 Deallocate (解除分配),然后进行了 Restart ,然后重新部署了我的SF应用程序,但这种方法有效(我没有测试是否仅进行重启即可).但是,使用这种方法时要非常小心,请确保在取消分配SF集群时要了解一些权衡因素
- Open Cloud Explorer from VS
- Expand Virtual Machine Scale Sets
- Locate the scale set containing your SF cluster.
- Right-click Update diagnostics...
- In the dialog, check Send diagnostics to Application Insights and add the Instrumentation key for you AI sink
- Click OK and leave the dialogue
- You might get an error (I did), but if you re-open the dialog you will find that the settings are still there.
- To 'apply' the new settings to the cluster, open your azure portal, select All resources, and open the Virtual Machine Scale Set
- At this point, hopefully selecting Restart will apply the changes to the cluster. I did a Deallocate followed by a Restart 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
这篇关于将Application Insight添加到现有的Azure Service Fabric群集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文