LeanSentry Diagnostics guide

Fix IIS, ASP.NET, ASP and Http.sys errors

Identify severe and actionable errors across your entire IIS, ASP.NET, and Http.sys web stack. Diagnose complex errors like 503s down to code, and even debug hard-to-reproduce production errors in Visual Studio.

Category Diagnostics
Tags errors

Web applications often experience errors in production. LeanSentry is designed to help you identify the important errors across youre entire web stack, and give you the actionable information you need to resolve them.

LeanSentry detects and diagnoses important IIS, ASP.NET, and Http.sys errors for your website.

LeanSentry tracks and classifies errors across all layers of your website, including the Http.sys listener, IIS, ASP .NET, and your application code. It automatically determines the impact of errors, to help you respond to severe errors that affect your website's availability.

Finally, LeanSentry tries to identify actionable errors that you can more easily fix, and alerts you to regressions or interesting changes in error behavior.

Read on to learn how you can use LeanSentry to respond to severe errors, and/or proactively improve your website's service level by fixing actionable errors.

[SCENARIOS]
  1. Respond quickly to severe and high impact errors
  2. Proactively fix actionable errors
[GETTING DETAILS]
  1. View error details
  2. ADVANCED: Debug hard-to-reproduce production errors in Visual Studio
[IMPROVE DATA QUALITY]
  1. Get the best error tracking for your website
  2. Control error notifications and error importance

Respond quickly to severe and high impact errors

In some cases, important errors can impact the stability of your website. For example:

  1. An initialization exception in your web application,
  2. A 503/Queue full error due to server overload,
  3. Your application pool being disabled due to repeated crashes.
  4. An application error that is affecting a high percentage of your traffic.

It is critical to resolve the conditions causing these errors ASAP, to prevent downtime or severe impact to your website's availability.

LeanSentry automatically detects severe errors and alerts you to them.

Severe 503 queue full incident, with diagnosis.

For many severe errors, LeanSentry uses the power of its issue diagnostics to determine the root cause of the error, such as for 503/Service unavailable errors due to performance problems or worker process failures.

Severe 503 due to Crash incident, with diagnosis.

Normally, these errors can be nearly impossible to attribute to a specific application problem. With just-in-time diagnostics, the error alert can directly identify the code indirectly triggering the error condition, and you can go straight to the related diagnostic report to get the full details.

Proactively fix actionable errors

Request errors that do not severely impact your website's availability, still can negatively affect your users' experience and reduce your website's service level. It's a good idea to proactively fix these errors to improve your level of service.

LeanSentry will periodically alert you if we believe you have actionable application errors in your site. To make sure LeanSentry can properly connect your IIS errors with your underlying application exceptions, see getting full exception details for your errors.

LeanSentry alerts about actionable errors in your applications.
...
Error details with exception stack trace information for actionable application errors.

You can also view all errors LeanSentry is tracking, and resolve the errors with the highest total impact by vising your Errors page for your website. LeanSentry will automatically tag errors that it believes have actionable details or have severe impact.

See all errors in your website, to fix the errors with the highest impact.

TIP: You can click the "User code" or other tags to filter to application errors, or Control-click the "Total requests" or other table headings to show the errors sorted by that metric.

View error details

You can get details on each error by clicking the "view" link in alert, or by selecting the error on the website's Errors tab.

The details vary depending on the error type. For example, Application errors caused by .NET exceptions will have full exception information that your developers will need to locate the errors in application code.

Exception and stack trace details for application errors.

IMPORTANT: To help LeanSentry link your IIS errors (e.g. IIS 500.0) to actionable application exceptions, you'll want to add our optional LeanSentry.ApplicationMonitoring.dll library to your application. See getting full exception details for your errors

LeanSentry will also provide additional details about recogized IIS and Http.sys errors.

Finally, you can also view specific requests that triggered each error on it's "Occurrences" tab. This can be helpful in getting more specific context on individual error instances.

Request details for specific error occurrences.

Debug hard-to-reproduce production errors in Visual Studio

Do your developers need more information about the state of your code at the moment of the error? You can now capture the complete application state at the moment of a specific error, to allow your developers to inspect the exact error in their local Visual Studio.

You can do this for .NET application errors using LeanSentry's new Exception Debugging feature.


Get complete error tracking for your website

To make sure LeanSentry can give you the most actionable information for your errors, follow these quick steps:

  1. Add ApplicationMonitoring.dll to your application. This lightweight library will automatically link your IIS errors to application exceptions, and improve other LeanSentry diagnostics.

    For full details, see Track application errors.

  2. If your application handles errors in your code, add a line of code to your application's error handler to associate the exception with the current request.

    HttpContextBase context = ...;
    Exception error = ...;
    
    LeanSentry.ApplicationMonitoring.Monitoring.LogError(context, error);	
    

    For full details, see Track application errors.

  3. Make sure that ASP .NET counts all your application errors. LeanSentry can automatically make a one-time configuration change to do this, but it requires your permission to make this change (strongly recommended):

    Allow LeanSentry to make a one time best-practice configuration change in your environment settings.

    For full details, see Track application errors.

  4. Get high quality exception stack traces. If your exception stack traces are missing line numbers, this can make it harder for your developers to trace the error to a specific line of code. To fix, make sure your are building your application with PDB files, and that you are deploying your PDB files along with your application DLLs.

    Deploy PDB files with your application to enable exception line numbers.
    NOTE: You can still build your application in release mode with optimizations, this change simply makes sure that more information is included in exception stack traces and LeanSentry diagnostic reports.

    For full details, see Track application errors.

As a bonus, adding ApplicationMonitoring.*.dll will also allow LeanSentry to link your IIS errors to the underlying application exceptions, which instantly improves alerting and makes the errors actionable for your developers!


Control error notifications and error importance

Production applications can experience hundreds of different errors. LeanSentry automatically determines which errors are worth your attention, to alert you to severe and actionable issues but avoid spamming you with too much information.

You can improve the relevance of error notifications by controlling which websites, urls, and errors are important to you.

  1. Mark websites as Important, Watch (or Ignore). We'll notify you more proactively for Important or Watched sites, and less often for Normal sites. We will not notify you about errors in Ignored sites.

    You can change the website's importance on the main/timeline page of your environment.

    Set website importance level.

    TIP: We will not normally send error notifications for sites below the Important level.

  2. Expand your website's urls to a useful level, and mark them as Important, Watch (or Ignore). You can set the importance of key urls in your website to get more relevant error notifications.

    You can tweak your URL namespace and mark urls as important on the "Urls" tab for each website. See customizing url tracking to your application for more details.

  3. Mark specific errors as Important, Watch (or Ignore). Once errors are detected, you can ignore them or prioritize them for notifications on the "Errors" tab of each website.

    Set error importance level.

    TIP: Want to keep a close eye on a specific error? Set it to Watch temporarily to get more frequent updates about any important changes.

You can use importance levels to get tailored error notifications that have the most relevance to your team, while keeping the notification overwhelm down.





More resources


Cannot use SAAS monitoring / need an on-premise solution?

Talk to us about LeanSentry On-Premise.

Want to automate LeanSentry deployment in a cloud environment?

Read this.

Need expert assistance with an urgent performance issue?

Get an quick consultation from one of our performance engineers.