简体   繁体   English

在Azure中使用来自Node.js的DiagnosticMonitor

[英]using DiagnosticMonitor from nodejs in Azure

I wonder if people had any luck configuring DiagnosticMonitor in a nodejs app running in Azure? 我想知道人们是否有运气在Azure中运行的nodejs应用程序中配置DiagnosticMonitor? The http://www.windowsazure.com/en-us/develop/nodejs/common-tasks/performance-profiling/ link is under nodejs...but shows C# sample code. http://www.windowsazure.com/zh-CN/develop/nodejs/common-tasks/performance-profiling/链接位于nodejs下面,但显示了C#示例代码。

Any hints/sample code are much appreciated. 任何提示/示例代码都非常感谢。

There is actually a better way to configure Windows Azure Diagnostics, it's through the diagnostics.wadcfg file. 实际上,存在更好的方法来配置Windows Azure诊断,这是通过diagnostics.wadcfg文件进行的。 You simply configure the diagnostics through this XML file and include it in your package. 您只需通过此XML文件配置诊断并将其包括在包中。

David Hardin explains the advantages in a blog post: David Hardin在博客文章中解释了优点:

I instead recommend using diagnostics.wadcfg for all role types to perform the the majority of the configuration and only configure via code when required, such as when using a custom performance counter. 相反,我建议对所有角色类型使用diagnostics.wadcfg来执行大部分配置,并且仅在需要时(例如,使用自定义性能计数器时)通过代码进行配置。 This will allow WAD to capture diagnostics prior to OnStart's execution plus it is easier to maintain a config file than code. 这将使WAD能够在OnStart执行之前捕获诊断信息,而且维护配置文件比代码更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM