31

Microsoft Windows Azure - Diagnostics Presentation

Embed Size (px)

Citation preview

Page 1: Microsoft Windows Azure - Diagnostics Presentation
Page 2: Microsoft Windows Azure - Diagnostics Presentation
Page 3: Microsoft Windows Azure - Diagnostics Presentation

>

>

>

>

>

>

>

>

>

>

>

>

>

>

Page 4: Microsoft Windows Azure - Diagnostics Presentation

>

>

>

>

>

>

>

>

Page 5: Microsoft Windows Azure - Diagnostics Presentation

Demo

Page 6: Microsoft Windows Azure - Diagnostics Presentation

Role

Role Instance

Diagnostic

Monitor

Configuration

Quota

enforcement

Local directory storage

Data collection

(traces, logs, cra

sh dumps)

Windows

Data Sources

IIS Logs & Failed Request Logs

Perf Counters

Windows Event Logs

Page 7: Microsoft Windows Azure - Diagnostics Presentation

Role

Role Instance

Diagnostic

Monitor

Local directory storage

Request upload

Windows

Azure

Storage

Scheduled or on-demand

upload

Windows

Data Sources

Page 8: Microsoft Windows Azure - Diagnostics Presentation

Windows Azure

Hosted Service

Development

Fabric

Page 9: Microsoft Windows Azure - Diagnostics Presentation

Development

Fabric

Windows Azure

Hosted Service

Controller

Code

Desktop Diag Application

Diagnostic

Manager

Configure

Page 10: Microsoft Windows Azure - Diagnostics Presentation

Activate Windows Azure Diagnostics

Generate Data

Enable Local Buffering

Transfer to Windows Azure Storage

Page 11: Microsoft Windows Azure - Diagnostics Presentation

// This is done for you automatically by // Windows Azure Tools for Visual Studio

// Add a reference to Microsoft.WindowsAzure.Diagnosticsusing

// Activate diagnostics in the role's OnStart() methodpublic override bool

// Use the connection string contained in the // application configuration setting named // "DiagnosticsConnectionString” // If the value of this setting is // "UseDevelopmentStorage=true" then will use dev stgDiagnosticMonitor "DiagnosticsConnectionString"

Page 12: Microsoft Windows Azure - Diagnostics Presentation

<!–This is automatically inserted by VS. The listener routes System.Diagnostics.Trace messages to Windows Azure Diagnostics.

--><system.diagnostics><trace><listeners><add

type= Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35name= AzureDiagnostics >

<filter type= /></add>

</listeners></trace>

</system.diagnostics>

Page 13: Microsoft Windows Azure - Diagnostics Presentation

stringRoleEnvironment

// Trace with standard .Net tracing APIsTrace

"Informational trace from "

// Capture full crash dumpsCrashDumps true// Capture mini crash dumpsCrashDumps false

Page 14: Microsoft Windows Azure - Diagnostics Presentation

// Managed traces, IIS logs, failed request logs, // crashdumps and WA diags internal logs are buffered // in local storage by default. Other data sources must be // added explicitlyDiagnosticMonitorConfigurationDiagnosticMonitor

// Add performance counter monitoringPerformanceCounterConfiguration newPerformanceCounterConfiguration

// Run typeperf.exe /q to query for counter names

@"\Processor(*)\% Processor Time"TimeSpan

// Continued on next slide...

Page 15: Microsoft Windows Azure - Diagnostics Presentation

// Continued from previous slide...

// Add event collection from the Windows Event Log// Syntax: <Channel>!<xpath query> // http://msdn.microsoft.com/en-us/library/dd996910(VS.85).aspx

"System!*"

// Restart diagnostics with this custom local buffering // configurationDiagnosticMonitor"DiagnosticsConnectionString"

Page 16: Microsoft Windows Azure - Diagnostics Presentation

<!--You can optionally enable IIS failed request tracing.This has some performance overheadA service upgrade is required to toggle this setting.

--><system.webServer><tracing><traceFailedRequests><add path= * ><traceAreas><add provider= ASP verbosity= Verbose /><add provider= ASPNET

areas= Infrastructure,Module,Page,AppServiceverbosity= Verbose />

<add provider= ISAPI Extension verbosity= Verbose /><add provider= WWW Server verbosity= Verbose />

</traceAreas><failureDefinitions statusCodes= 200-599 />

</add></traceFailedRequests>

</tracing></system.webServer>

Page 17: Microsoft Windows Azure - Diagnostics Presentation

// Start off with the default initial configurationDiagnosticMonitorConfigurationDiagnosticMonitor

"Application!*"

TimeSpan

DiagnosticMonitor "DiagnosticsConnectionString"

Page 18: Microsoft Windows Azure - Diagnostics Presentation

// On-Demand transfer of buffered files.// This code can live in the role, or on the desktop,// or even in another service.var new DeploymentDiagnosticManager

var

var DataBufferNameOnDemandTransferOptionsnew OnDemandTransferOptions

DateTimeDateTime

LogLevelGuid

Page 19: Microsoft Windows Azure - Diagnostics Presentation

>

>

>

>

>

>

>

>

Page 20: Microsoft Windows Azure - Diagnostics Presentation

>>

>

>

>>

>

>

>

Data Source Default Configuration How to Configure Format

Trace logs Enabled, stored locally Diag API, Trace listener Table

Performance Counters Disabled Diag API Table

Windows Event Logs Disabled Diag API Table

Infrastructure Logs Enabled, stored locally Diag API Table

IIS Logs Enabled, stored locally Diag API, Web.config Blob

IIS Failed Request Logs Disabled Diag API, Web.config Blob

Application Crash Dumps Disabled Diag API, Crash API Blob

Arbitrary Logs & Files Disabled Diag API Blob

>

>

>

Page 21: Microsoft Windows Azure - Diagnostics Presentation

>

>

>

>

>

>

>

>

>

Page 22: Microsoft Windows Azure - Diagnostics Presentation

Demo

Page 23: Microsoft Windows Azure - Diagnostics Presentation

http://diags.cloudapp.net

Controller

DiagController.exe

Diagnostic

Manager

PowerShell scripts

Survey

Results

Survey

Web Role

Diagnostic

Monitor

My Utility

Classes

My Utility

Classes

Table

Diags

Page 24: Microsoft Windows Azure - Diagnostics Presentation
Page 25: Microsoft Windows Azure - Diagnostics Presentation

>

>

>

>

>

Page 26: Microsoft Windows Azure - Diagnostics Presentation
Page 27: Microsoft Windows Azure - Diagnostics Presentation
Page 28: Microsoft Windows Azure - Diagnostics Presentation

>

>

channel9.msdn.com/learnBuilt by Developers for Developers….

Page 29: Microsoft Windows Azure - Diagnostics Presentation

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market

conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT

MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 30: Microsoft Windows Azure - Diagnostics Presentation