azure - How to force content of diagnostics.wadcfg to be reflected in wad-control-container -
i've setup diagnostics.wadcfg lots of performance counter (90+).however, it's not been reflected on wad-control-container blob. made sure file located under bin folder.
my webrole has code snippet below onstart():
// diagnostic monitor specified role instance. roleinstancediagnosticmanager roleinstancediagnosticmanager = new roleinstancediagnosticmanager(mystorageaccount, "28281fc7754b44faa9ccf4911983edf1", "mywebrole", "deployment(1).myazureproject.webrole1.0"); // current diagnostic monitor role. diagnosticmonitorconfiguration currentconfiguration = roleinstancediagnosticmanager.getcurrentconfiguration(); // use 30 seconds performance counter sample rate. timespan perfsamplerate = timespan.fromseconds(30.0); // add performance counter processor time current configuration. currentconfiguration.performancecounters.datasources.add(new performancecounterconfiguration() { counterspecifier = @"\processor(_total)\% processor time", samplerate = perfsamplerate }); // apply modified configuration diagnostic monitor role instance. roleinstancediagnosticmanager.setcurrentconfiguration(currentconfiguration); is possible onstart() logic takes precedence , overwrites content on diagnostics.wadcfg?
my diagnostics.wadcfg file below:
<diagnosticmonitorconfiguration xmlns="http://schemas.microsoft.com/servicehosting/2010/10/diagnosticsconfiguration" configurationchangepollinterval="pt1m" overallquotainmb="8192"> <performancecounters bufferquotainmb="100" scheduledtransferperiod="pt1m"> <!-- 1. azure_asp_net --> <performancecounterconfiguration counterspecifier="\asp.net\application restarts" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\applications running" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\request execution time" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\requests current" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\requests disconnected" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\requests queued" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\requests rejected" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\request wait time" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\state server sessions abandoned" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\state server sessions active" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\state server sessions timed out" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\state server sessions total" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\worker processes running" samplerate="pt30s" /> <performancecounterconfiguration counterspecifier="\asp.net\worker process restarts" samplerate="pt30s" /> </performancecounters> </diagnosticmonitorconfiguration> thanks.
if there file in wad-control-container in blob storage deployment, role , instance take precedence. way if modifying file externally system recycle of role won't lose settings.
from msdn documentation:
"the .wadcfg file ignored if there xml configuration in wad-control-container blob storage container."
the order of precedence can found @ http://msdn.microsoft.com/en-us/library/windowsazure/dn205146.aspx.
my understanding including wadcfg file in solution diagnostics subsystem picks file , uses defaults. copy of file placed in wad-control-container if there isn't file there.
another thing note shared code configure performance counter, pass configuration on? can post more of onstart code line deals configuring of diagnostics?
Comments
Post a Comment