
How FREB ( Failed Request Tracing) works:
When you enable FREB it will monitor every request and store the information in memory. If the trigger is not hit, it will drop the information stored in memory. When the trigger you have configured is hit (ie 500, .aspx page, ect) it will write the info out to a file for that request. Typically the performance issues arise when there are issues or bottlenecks at the file IO level caused by a lot of files being written or anti-virus scanning the files (Web apps wouldn’t have the AV issue). FREB was built to run in production environments but you still have to make your own judgement on how you want to use it.
There are two types of rules available:
- statusCodes
Specifies the status code(s) you want to trace. You can enter multiple status codes in this list by using commas to separate each code. You can also refine your status codes using sub status codes, such as “404.2, 500” or a range of sub status codes such as “400-599”. - timeTaken
Specifies the maximum time that a request may spend in processing before it is marked as failed and then traced.
- The maximum number of Failed Request Tracing (FREB) files is 50. Once this limit is reached, new FREB files will begin to overwrite previously saved FREB files.
- FREB is automatically disabled after one hour in Free and Shared mode.
Modifying your Web.config will allow you to gain an extra level of granularity by narrowing down to a specific condition.
- Merge the following configuration into your web site’s web.config.
- On the Azure portal, turn on “FAILED REQUEST TRACING” for your site.
- Use the following configurations:
To Capture All Requests: Failed and Successful
<system.webServer>
<!– Below section is required for FREB tracing –>
<tracing>
<traceFailedRequests>
<remove path=”*” />
<add path=”*”>
<traceAreas>
<add provider=”ASP” verbosity=”Verbose” />
<add provider=”ASPNET” areas=”Infrastructure,Module,Page,AppServices” verbosity=”Verbose” />
<add provider=”ISAPI Extension” verbosity=”Verbose” />
<add provider=”WWW Server” areas=”Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI” verbosity=”Verbose” />
</traceAreas>
<failureDefinitions statusCodes=”100-999″ />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>
To Capture a Specific Error Code:
<system.webServer>
<!– Below section is required for FREB tracing –>
<tracing>
<traceFailedRequests>
<remove path=”*” />
<add path=”*”>
<traceAreas>
<add provider=”ASP” verbosity=”Verbose” />
<add provider=”ASPNET” areas=”Infrastructure,Module,Page,AppServices” verbosity=”Verbose” />
<add provider=”ISAPI Extension” verbosity=”Verbose” />
<add provider=”WWW Server” areas=”Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI” verbosity=”Verbose” />
</traceAreas>
<failureDefinitions statusCodes=”500″ />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>
Capture by Error Code & Time Taken:
<system.webServer>
<tracing>
<traceFailedRequests>
<remove path=”*” />
<add path=”*”>
<traceAreas>
<add provider=”ASP” verbosity=”Verbose” />
<add provider=”ASPNET” areas=”Infrastructure,Module,Page,AppServices” verbosity=”Verbose” />
<add provider=”ISAPI Extension” verbosity=”Verbose” />
<add provider=”WWW Server” areas=”Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI” verbosity=”Verbose” />
</traceAreas>
<failureDefinitions statusCodes=”200-999″ timeTaken=”00.00.00″ />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>
Capture by Time Taken:
Merge the following configuration into your web site’s web.config.
On the Azure portal, turn on “FAILED REQUEST TRACING” for your site.
3. Use this configuration :
<system.webServer>
<tracing>
<traceFailedRequests>
<remove path=”*” />
<add path=”*”>
<traceAreas>
<add provider=”ASP” verbosity=”Verbose” />
<add provider=”ASPNET” areas=”Infrastructure,Module,Page,AppServices” verbosity=”Verbose” />
<add provider=”ISAPI Extension” verbosity=”Verbose” />
<add provider=”WWW Server” areas=”Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI” verbosity=”Verbose” />
</traceAreas>
<failureDefinitions timeTaken=”00.00.00″ />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>