Defining Exception Sets and Rules
|PreEmptive Analytics for TFS User Guide|
|Defining Exception Sets and Rules|
Glossary Item Box
Subscriptions define the mapping between an application instrumented with exception reporting capabilities, a team project in which to create work items based on exceptions the application experiences, and the rules that govern the creation of such work items. Subscriptions can have multiple rules, each of which define a set of conditions under which a work item will be created including criteria such as the number and type of exception reports received, and the time period in which they must be received in order to trigger the creation of a work item. These settings are configured across all provisioned projects using the Configuration Utility installed alongside the PreEmptive Analytics aggregator service, or on a per-project basis via the PreEmptive Analytics Aggregator Visualizer extension for Visual Studio.
|PreEmptive Analytics CE allows you to create a single subscription for each team project, and to define up to three rules for each subscription. In addition, only a single rule type (ErrorCountOverTime) is included with PreEmptive Analytics CE. PreEmptive Analytics for TFS, purchased directly from PreEmptive Solutions, contains the ability to define an unlimited number of subscriptions and rules and includes additional rule types. For more information, please visit www.preemptive.com/pa or e-mail email@example.com.|
Create exception rules
- Launch Visual Studio and navigate to the Team Explorer pane. Provisioned team projects will show a PreEmptive Analytics entry.
- Click the PreEmptive Analytics node to open the PreEmptive Analytics hub.
- In the Settings group, click Configure. This will launch the rule configuration window.
- Click on the General node in the left navigation. The Aggregator Configuration URL will be displayed. If there is an error connecting to the Aggregator Configuration service, it must be corrected before you can proceed. See the Troubleshooting the Analytics Aggregator Service topic for steps in solving issues with the aggregator service.
- Select the Exception Sets node in the left navigation. By default, there is a single exception set defined named AllExceptions which matches all incoming exceptions. You can create other exception sets which match one or more exception types as follows:
- Click the + icon to add a new, empty exception set. Provide a name for this exception set in the Name field.
- In the Exceptions grid, add a new row for each exception type you would like to track. Fill in the fully-qualified exception type name (such as System.Net.WebException or java.io.FileNotFoundException) in the Exception Type column, and provide a name for this exception type (typically the unqualified exception type name) in the Name column.
PreEmptive Analytics does not attempt to traverse the inheritance hierarchy of reported exceptions. For example, adding a rule for System.ApplicationException will not automatically match reported exceptions that are sub-types of System.ApplicationException. Once you have created rules that reference this exception set, you will not be able to delete it or change the Name field without first removing all the rules that reference it.
- Select the Subscriptions node in the left navigation, and click the + icon to add a new, empty subscription.
- Provide a name for this subscription in the Name field.
In the Identity group box, supply the Company and Application ID values you used when instrumenting your application to send exception reporting data. For more information on how to add and configure exception reporting in your applications, see the Adding Exception Reporting to a .NET Application topic.
- Leave the value of the Data Retention Days field set to the default of 30 unless you wish to change the duration for which the aggregator service will keep detailed data for each received exception.
- In the Team Foundation Server group box, optionally specify the area path you wish to use for the created work items in the Area Path field.
In the Rules grid, you can create rules to be applied to exception reports received from the application you specified above:
- Choose the exception set you wish to use for this rule in the Exception Set Name dropdown. All exceptions that are included in this set can potentially trigger the execution of the rule.
- In the Span Minutes column, specify how far back from the current time the aggregator service should query for exception report messages. Each time the aggregator service checks for exception new exception reports, if there are sufficient exception reports to meet the threshold criteria between the time of the check and the x minutes prior, a work item will be created. The default is one day (1440 minutes).
- In the Threshold column, specify the threshold value you wish to use, such as the number of exceptions (of the types defined in your exception set) that must be received to trigger the creation of a work item.
- You can add additional subscriptions to process exception reporting data from other applications, or from the same application using a different Area Path by selecting the Subscriptions node and clicking the + icon to create additional subscriptions.