Note that there are some explanatory texts on larger screens.

plurals
  1. POAzure WorkerRole and WebRole tracing latency OnStart?
    primarykey
    data
    text
    <p>I am new to Azure development and I have been struggling in getting tracing to work (to Azure storage).</p> <p>I finally managed to make it work but the first tracing messages don't seem to get transferred to the WADLogsTable.</p> <p>As a workaroud I temporarily fixed it adding a 10s sleep after starting the DiagnosticMonitor.</p> <p>I started using this in the OnStart method of a WorkerRole:</p> <pre><code>var config = DiagnosticMonitor.GetDefaultInitialConfiguration(); config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose; DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", config); </code></pre> <p>now I changed it as suggested to:</p> <pre><code>string wadConnectionString = "Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString"; CloudStorageAccount cloudStorageAccount = CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue(wadConnectionString)); RoleInstanceDiagnosticManager roleInstanceDiagnosticManager = cloudStorageAccount .CreateRoleInstanceDiagnosticManager(RoleEnvironment.DeploymentId, RoleEnvironment.CurrentRoleInstance.Role.Name, RoleEnvironment.CurrentRoleInstance.Id); DiagnosticMonitorConfiguration diagnosticMonitorConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration(); diagnosticMonitorConfiguration.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); roleInstanceDiagnosticManager.SetCurrentConfiguration(diagnosticMonitorConfiguration); </code></pre> <p>but I am still getting the same behavior (now a sleep of 10s is not enough anymore, I had to change it to 20s).</p> <p>Does anyone experience my same issues? Has anyone a better workaround? Am I doing something wrong?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload