Saturday, August 20, 2016

Using the Error Reporting Tool


org.wso2.developerstudio.eclipse.errorreporter plugin is a Eclipse plugin that works with version 3.5 or above. Once the plugin is installed with Developer studio plugins, it automatically detects any errors related to Developer studio. It allows the Developer Studio user to create an issue in Jira under the relevant Eclipse project and also to send an email with the error report to any user given recipient, without leaving the IDE.

Preference Page

The Error Reporting Tool provides a preference page to maintain the user preferences. It is the best practice to set the mandatory fields in this preference page as early as possible, because that affects the report publishing task.

The preference page of Error Reporting Tool can be found at General-.> Preferences->Developer Studio Error Reporting. The Preference Page is shown in Figure 1.

Figure 1

Contact Information

Entering the contact information is optional. This information will be useful for the development team to contact the user, if there is any need for follow up conversations.

Sending Options

The user is given two sending options to select.
  • Report the error in Jira

By selecting this option, the user can chose to post the issue in WSO2 Jira

  • Report the error in Jira and send an email

By selecting this option, the user can chose to post the issue in WSO2 Jira and also to send an email to a user given email address in the Gmail information section.

Jira – Information

Filling this section is mandatory. The Developer Studio Users need to fill in the Remote Jira URL and Inquiry status URL.
  • Remote Jira URL - ”{URL of the remote micro service}/publish/jira”
  • Inquiry Status URL - ”{URL of the remote micro service}/publish/status”
  • Default Project Key - This is the key of the Project, the issue is reported in Jira. By default this is filled as “TOOLS”.

Gmail – Information

Filling this section is mandatory if the user has selected “Report the error in Jira and send an email” option in sending preferences.
  • Remote Email URL - ”{URL of the remote micro service}/publish/email”
  • Recipient Email – Email address of the recipient, user wishes to send the email to.

Error Reporting Process

Whenever a plugin reports an error to the Eclipse error log, and if that error is related to a Developer Studio plugin, the error notification dialog pops up (Figure 2), asking the user to report the error.

Figure 2

Here the user is given the option to view the details of the Error Report that is emailed and sent to Jira (Figure 3). If the user is comfortable with the error report, he can select one of the two options, Publish in Jira or Publish in Jira and email. The sending option would be the option set at the preference page.

Figure 3

If the user selects OK, the error reports will be published, displaying the following widow (Figure 4).

Figure 4

In case where the user has not set the mandatory fields in the Preference Page, he will be prompted first with the dialog box given below in figure 5. The user can follow the link given there and set the mandatory fields in the Preference Page. Upon completion of the mandatory field, the user will be prompted with the dialog box given in figure 2.

Figure 5

Report Archive

The Error Reporting Tool allows the users to view the previously sent error reports and their current status. The Report Archive can be viewed at Error Reporter -> Report Archive. By selecting the listed reports, user can view the error report in the text box.

User can get to know the current status of any listed issue using "Inquire Status" context menu option.

Figure 6

How other plugins can extend

This plugin provides an extension point for the other Developer Studio plugins to extend. This extension provides an element- ‘ProjectKeys' with two attributes - package and key. The plugins which extends this extension point can provide their own Project key in WSO2 Jira as the key and their plugin ID as the package. Once an error takes place and if that error is related to any of the extended plugins, the project keys defined by those plugins would be used when posting the issue in Jira.

Extension point ID-org.wso2.deveoperstudio.eclipse.errorreporter.jirakey

Important Facts

  • For any error to be recognized as a related error to Developer studio, the plugin name and packages should follow the default naming convention. Ex- the package names should start with org.wso2.developerstudio…
  • By default, issues would be created under the project ‘TOOLS’ in Jira. However if the plugins related to the error have defined their relevant project keys using the extension point, those keys would be used in posting the issue.
  • By default the error reports are stored in a directory called ErrorReports at user directory. If this directory or its contents are changed, it may affect the functionality of the Report Archive.
  • This plugin automatically starts once the Developer Studio workbench loads. If the user wishes to disable this early startup behavior, that can be by unchecking the Error Reporter Tool at Windows-> Preferences-> General->Startup and Shutdown, as depicted in figure 7.

Figure 7

However note that once this start up behavior is unchecked, the plugin would no longer detect any errors. But the error report archive would function.

No comments:

Post a Comment