using DiagnosticMonitor from nodejs in Azure

I wonder if people had any luck configuring DiagnosticMonitor in a nodejs app running in Azure? The http://www.windowsazure.com/en-us/develop/nodejs/common-tasks/performance-profiling/ link is under nodejs...but shows C# sample code.

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. You simply configure the diagnostics through this XML file and include it in your package.

David Hardin explains the advantages in a blog post:

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. This will allow WAD to capture diagnostics prior to OnStart’s execution plus it is easier to maintain a config file than code.