Since the initial launch of Diagnostic as a Service (DaaS) site extension for Microsoft Azure Websites, several new features and improvements have been added to this feature.
Following are the recent updates to the DaaS site extension.
1) PHP Process Report
For PHP based applications, troubleshooting slow responses or understanding process snapshot for a given time can be a challenging task. Previous DaaS supported capturing and analyzing PHP dumps to provide many useful information but it took long time and resource to store and analyze the dumps captured, especially when there are a large number of Php-cgi processes (processes running your PHP code). To improve the efficiency in these scenarios, we developed this new feature to attach to live PHP processes and process a PHP process report without capturing dumps, which contains:
List of all PHP processes on the site
Detailed information for each Php-cgi process, includes:
2) PHP Error Log Analyzer
We allow site owners to collect and analyze PHP error logs (php-errors.log) directly from DaaS site extension. Php-errors.log is generated by default anytime your PHP application is throwing an exception. It resides insider your site’s logfiles directory. A PHP error log processing report will be created with the following features:
Unique PHP events (error, warning, parse errors etc.) will be parsed and shown in time order with the duplication of events removed.
The report provided include:
- PHP Fatal Errors in last 24 hours
- PHP Fatal Errors in last 7 days
- PHP Parse Error in last 24 hours
- PHP Parse Error in last 7 days
- All Fatal Errors
- Top 10 PHP pages with most error
3) Enhancement to DaaS site functionality
- PHP symbols for all PHP versions are preloaded in web site environment. PHP live process and dump analysis can be performed with right symbols loaded without any effort by site owners.
- Support for custom symbols – Site owners can upload symbols for their custom module for dump analysis performed by DaaS. The symbols can be uploaded to D:homeSymbols through FTP or deployment of your choice. This way, you always get analysis detailed to line of code even in your custom module.
- Web site settings will be checked automatically to determine the collectors and analyzers available for selection. Instruction will be given for how to enable logging for data collection.
- Expose DaaS functionality through command line/Web API support (DaaSConsole.exe) to allow automation of diagnostics tasks. Site owners can use DaaS command line to create, view and cancel sessions. Imagine a scenario where you would want to kick off DaaS session based on conditions detected by AutoHeal feature. The command line can be executed from Kudu CMD console by browsing to D:homedataDaaSbin directory.
[Syntax] D:homedataDaaSbin>daasconsole.exe Usage: DaasConsole.exe -[param1 args] [-parameter2 ...] Parameters: -Troubleshoot[ ...] [TimeSpanToRunForInSeconds] Create a new Collect and Analyze session with the requested diagnosers. Default TimeSpanToRunForInSeconds is 30 -CollectLogs [ ...] [TimeSpanToRunForInSeconds] Create a new Collect Only session with the requested diagnosers. Default TimeSpanToRunForInSeconds is 30 -CollectKillAnalyze [ ...] [TimeSpanToRunForInSeconds] Create a new Collect Only session with the requested diagnosers, kill the main site's w3wp process to restart w3wp, then analyze the collected logs. Default TimeSpanToRunForInSeconds is 30 -ListDiagnosers List all available diagnosers -ListSessions List all sessions -GetSasUri Get the blob storage Sas Uri -SetSasUri Set the blob storage Sas Uri -Setup Start the continuous webjob runner (if it's already started this does nothing) -GetSetting The the value of the given setting -SetSetting Save new value for the given setting -ListInstances List all live instances -AnalyzeSession Begin analysis for session with the specified ID -CancelSession Cancel session with the specified ID [Examples] To list all diagnosers run: DaasConsole.exe -ListDiagnosers To collect and analyze memory dumps of w3wp.exe with 60 seconds interval, just run DaasConsole.exe -Troubleshoot "Memory Dump" 60 To collect memory dumps, kill w3wp, and then analyze the logs run DaasConsole.exe -CollectKillAnalyze "Memory Dump" 60 To specify a custom folder to get the diagnostic tools from, set the DiagnosticToolsPath setting to the desired location
- Skip SCM process from dump capturing and analysis. Only dumps of website worker processes will be captured.
- Limit the dump generation to just one round.