The following sections describe the prerequisites for publishing statistics from the ESB profile of WSO2 EI.
Configuring the ESB to publish data to the Analytics profile
The required configuration details described below are available by default. In a clustered deployment, the following configurations should be checked for each WSO2 EI node in the cluster.
The following configurations in the ESB profile of WSO2 EI ensures that ESB data is published to the Analytics profile. The published data can then be analyzed via the Analytics dashboard.
- Open the
carbon.xml
file (stored in the<EI_HOME>/conf/
directory). Under
<Analytics>
, enter the relevant configurations as described in the table below.Property Required Value Example ServerURL
The URL to which the EI statistics are published as events. The format of this URL can be one of the following:
<protocol>://<hostname
<ip>:<port>
When you deploy EI Analytics as an HA cluster, enter the URLS of the Analytics nodes as a list of comma-separated URLS.
- Single-node deployment: tcp://localhost:7612
- HA Cluster:
tcp://analytics-server-1:7612,tcp://analytics-server-2:7612
AuthServerURL
When the authentication of EI statistics published to EI Analytics is carried out in a separate server, set this parameter to specify the URL of that authentication server.
The format of this URL can be one of the following:
<protocol>://<hostname
<ip>:<port>
ssl://localhost:7712
Username
The username to use when accessing the WSO2 EI Analytics server to publish configurations. admin
Password
The password to use when accessing the WSO2 EI Analytics server to publish configurations. admin
Open the
synapse.properties
file (stored in the<EI_HOME>/conf/
directory) and configure the following property.Property Description mediation.flow.statistics.enable
Set this property to
true
and enable statistics for the required ESB artifact, to record information such as the following, and publish them to the Analytics profile.- The time spent on each mediator.
- The time spent to process each message.
- The fault count of a single message flow.
Configuring the ESB to publish data to Jaeger
The following configurations in the ESB profile of WSO2 EI ensures that ESB data is published to Jaeger. The published data can then be visualized via the Jaeger UI.
Open the synapse.properties
file (stored in the <EI_HOME>/conf/
directory) and configure the properties given below.
Enabling statistics/message tracing
Follow the instructions give below to enable statistics monitoring and message tracing. You can use message tracing to track a message (including the message payload) throughout a mediation flow.
Note that it is not recommended to enable tracing in production environments as it generates a large number of events that reduces the performance of the analytics profile. Therefore, tracing should only be enabled in development environments.
Step 1: Enabling statistics/message tracing
Open the synapse.properties
file (stored in the <EI_HOME>/conf/
directory) and configure the properties given below.
Property | Description |
---|---|
mediation.flow.statistics.tracer.collect.payloads | Set this property to |
| Set this property to
Note that message tracing is not recommended for production environments. |
mediation.flow.statistics.collect.all | Set this property to If you set this property to |
Step 2: Enabling statistics/message tracing for ESB artifacts
If you have enabled the mediation.flow.statistics.collect.all
property in the synapse.properties
file as explained in the previous section, you will be monitoring the statistics of all the ESB artifacts (proxy services, REST APIs, sequences, and endpoints) by default. Alternatively, you have the option of enabling statistics for only the required artifacts. You can use WSO2 Integration Studio or the management console for this purpose.
In a clustered deployment, statistics should be enabled for the required artifacts in all the EI nodes if you have not enabled deployment synchronizing. If deployment synchronizing is enabled, you need to enable statistics for the required artifacts only in one node.
For example, you can enable statistics for a proxy service as described below.
- Start the ESB profile and log into the management console.
- In the Main tab, look for the Services section and click List under the same section to open the Deployed Services page. Then click on the required proxy service as shown below.
- Click Enable Statistics and Enable Tracing links. Note that message tracing is not recommended for production environments.
Click OK in the information message that appears to confirm that statistics/tracing is enabled.
EI Artifact Type | Path |
---|---|
Proxy Service | Main tab => Services => List => Deployed Services page => <Proxy_Service_Name> |
REST API | Main tab => APIs => Deployed APIs page |
Sequence | Main tab => Sequences => Mediation Sequences page |
Endpoint | Main tab => Endpoints => Manage Endpoints page |
Inbound Endpoint | Main tab => Inbound Endpoints => Manage Inbound Endpoints page |
If you have worker nodes configured in your deployment, use WSO2 Integration Studio to enable message tracing/statistics as follows. You need to set the value of the Trace Enabled and Statistics Enabled options to true in the Properties tab of the artifact. Note that message tracing is not recommended for production environments.