Skip to content

Instantly share code, notes, and snippets.

@wgv-zbonham
Last active August 29, 2015 14:21
Show Gist options
  • Save wgv-zbonham/72baaf9874d211142159 to your computer and use it in GitHub Desktop.
Save wgv-zbonham/72baaf9874d211142159 to your computer and use it in GitHub Desktop.
Enabling Diagnostics

Enabling diagnostics works on the Commercial side of things by following this guidance: Cloud Serivces .NET Diagnostics

However, when I move to upload the same package, with updated government (endpoint and storage) configuration, I don't get any diagnostics? I also don't get any of the storage tables created?

Environment:

  • .NET 4.5
  • Azure SDK 2.6

Steps are basically:

  1. Enable Diagnostics in Role Configuration
  2. Create Package
  3. Update configuration based on target environment
  4. Run Set-AzureServiceDiagnosticsExtension
  5. Bask in the glory that is Azure Diagnostics...except in government cloud?

When I run the Set-AzureServiceDiagnosticsExtension command I get an error:

Set-AzureServiceDiagnosticsExtension -servicename "sharedevusaia001" -slot Production -role LoggingWorkerRole -storagecontext $c
ontext -diagnosticsconfigurationpath C:\zach\PaaSDiagnostics.LoggingWorkerRole.PubConfig.xml
VERBOSE: Setting PaaSDiagnostics configuration for LoggingWorkerRole.
Set-AzureServiceDiagnosticsExtension : BadRequest: Could not find the extension with provider name space
Microsoft.Azure.Diagnostics and type PaaSDiagnostics.
At line:1 char:1
+ Set-AzureServiceDiagnosticsExtension -servicename "sharedevusaia001" -slot Produ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-AzureServiceDiagnosticsExtension], CloudException
    + FullyQualifiedErrorId : Hyak.Common.CloudException,Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.
   SetAzureServiceDiagnosticsExtensionCommand
$context = New-AzureStorageContext -storageaccountname "elsadevusaia001" -storageaccountkey "{hidden}" -Endpoint "core.usgovcloudapi.net"
<?xml version="1.0" encoding="utf-8"?>
<PublicConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
<WadCfg>
<DiagnosticMonitorConfiguration overallQuotaInMB="4096">
<DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Verbose" />
<Directories scheduledTransferPeriod="PT1M">
<IISLogs containerName="wad-iis-logfiles" />
<FailedRequestLogs containerName="wad-failedrequestlogs" />
</Directories>
<PerformanceCounters scheduledTransferPeriod="PT1M">
<PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\ISAPI Extension Requests/sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Bytes Total/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Requests/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Errors Total/Sec" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Queued" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Rejected" sampleRate="PT3M" />
<PerformanceCounterConfiguration counterSpecifier="\Processor(_Total)\% Processor Time" sampleRate="PT3M" />
</PerformanceCounters>
<WindowsEventLog scheduledTransferPeriod="PT1M">
<DataSource name="Application!*" />
</WindowsEventLog>
<CrashDumps dumpType="Full">
<CrashDumpConfiguration processName="WaAppAgent.exe" />
<CrashDumpConfiguration processName="WaIISHost.exe" />
<CrashDumpConfiguration processName="WindowsAzureGuestAgent.exe" />
<CrashDumpConfiguration processName="WaWorkerHost.exe" />
<CrashDumpConfiguration processName="DiagnosticsAgent.exe" />
<CrashDumpConfiguration processName="w3wp.exe" />
</CrashDumps>
<Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose" />
</DiagnosticMonitorConfiguration>
</WadCfg>
<StorageAccount>elsadevusaia001</StorageAccount>
</PublicConfig>
Set-AzureServiceDiagnosticsExtension -servicename "sharedevusaia001" -slot Production -role LoggingWorkerRole -storagecontext $c
ontext -diagnosticsconfigurationpath C:\zach\PaaSDiagnostics.LoggingWorkerRole.PubConfig.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment