Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse

Statistics Collectors and Declarative Service Components are two of many well-defined extension points supported by the WSO2 Governance Registry. Read more on Supported Extension Points for a complete list of extension points supported by WSO2 Governance Registry.

...

This sample is similar to the Notifications Subscriber Sample and uses the same BAM Toolbox.

Once successfully deployed this sample will report operation invocation statistics of WSO2 Governance Registry on the WSO2 Business Activity Monitor's dashboard. We will be reusing the code of the Handler Sample in this example. This sample requires Apache Maven and WSO2 Business Activity Monitor. See Installing Apache Maven for Governance Registry on Windows or Installing Apache Maven for Governance Registry on Linux. Also see Installing Business Activity Monitor on Windows from Binary Distribution or Installing Business Activity Monitor  on Linux and Solaris from Binary Distribution.

Instructions

1. Open to BAM_HOME/ repository/conf/carbon.xml and set the port offset to 1.

...

2. Start the WSO2 Business Activity Monitor. See Installing Business Activity Monitor on Windows from Binary Distribution or Installing  Business Activity Monitor  on Linux and Solaris from Binary Distribution.

3. Deploy the KPI_Registry_Activity.tbox BAM Toolbox to WSO2 Business Activity Monitor.

...

Info
titleTip

If the BAM Toolbox fails to install from the URL download the KPI_Registry_Activity.tbox Toolbox to your local file system and upload it.

Image RemovedImage Added

4. Navigate to GREG_HOME/ samples/handler/src to find the source code of the Handler Sample.

...

Info
titleNote

The command mvn clean install will trigger an Apache Maven Build in your command line. This requires you having installed Apache Maven. See Installing Apache Maven for Governance Registry on Windows or Installing Apache Maven for Governance Registry on Linux.

A successful run of Apache Maven will generate a report similar to the following:

...

11. Start the server and observe the command prompt. See Starting Governance Registry Management Console Installing on Windows or Starting Governance Registry Management Console Installing on Linux and Solaris.

Image RemovedImage Added

12. After the server has started, log into the Management Console and perform various operations such such Managing WSDLs, Managing Subscriptions and Search. This should generate several events for BAM, and you should see lines similar to the following printed on your command prompt, which indicates that you events were successfully generated. For best results, create multiple user accounts and log in using different credentials while you perform operations.

...

13. Navigate to the Gadget Portal of WSO2 Business Activity Monitor to see the statistics corresponding to your operations.

Image RemovedImage Added

A Statistics Collector must implement the org.wso2.carbon.registry.core.statistics.StatisticsCollector interface. You can have more than one active Statistics Collector at any given time where each of them can be useful in one or many scenarios. For example, Statistics Collectors are used to capture Invocation Statistics visible via JMX.

Excerpt
hiddentrue

Instructions on how to create a statistics collector to collect statistics of operation invocations.