logo

Metrics in WSO2 products

WSO2 Carbon Metrics [1] is a analytics tool, which is based on Metrics library [2]. This OSGI module is enabling Developers and DevOps guys to analyze the behaviors of WSO2 Carbon servers. This is really useful to gather performance related informations such as latency of the each module or latency in different scenarios. Some of the WSO2 products, including the WSO2 API Manager, has already bundled this feature to their latest releases and can be use OOB.

By adding a small Java code snippets to collect data in our existing Java classes we can submit stats to the metrics. Metrics will summarize those data and publish in a predefined time interval. There are 4 major data publishing options which we can use with WSO2 Metrics.

  • MBeans through JMX – You will be able to see the stats of JVM and other summarized data through the Jconsole.
  • RDBMS – Summarized data will be stored in a database table. There is a configuration file (CARBON_SERVER/repository/conf/datasources/metrics-datasources.xml) which you can used to set database related configurations.
  • CSV – Data will be written to separate CSV files in CARBON_SERVER/repository/log/metrics directory
  • WSO2 DAS (not available at the movement) – Graphical views of the summarized data will be presented in configured WSO2 DAS instance.

We can use the CARBON_SERVER/repository/conf/metrics.xml file to configure the metrics component. Mainly you have the options to enable or disable the feature and configure the data publishing options. Please note that you can enable more than one data publishing option at once, so you can view the stats in JConsole while storing data in RDBMS..

You can more details from [3] regarding configuration options.

[1] https://github.com/wso2/carbon-metrics
[2] http://metrics.dropwizard.io/3.1.0/
[3] https://docs.wso2.com/display/MB300/Enabling+Metrics+and+Storage+Types

Comments are closed.