Java agent for WSO2 server

Downloading the Agent

  1. Download the agent tar file from the following link.
curl --header "PRIVATE-TOKEN: $TOKEN " --output "{{AGENT_VERSION}}/"
  1. Copy the tar to the WSO2_HOME and untar.

Configuring the agent

  1. Delete the plugin apm-httpasyncclient-4.x-plugin-8.5.0.jar file from AGENT_HOME/plugins/apm-httpasyncclient-4.x-plugin-8.5.0.jar.
rm -rf $AGENT_HOME/plugins/apm-httpasyncclient-4.x-plugin-8.5.0.jar
  1. Update the following parameters in the agent.config file in the agent.
agent.service_name= APPLICATION_NAME
agent.force_tls= true
collector.backend_service = URL
agent.authentication = TOKEN_FROM_UI

Enabling proxy


The agent uses internet to communicate with backend address. If direct internet access is not enabled, pass a proxy through which it can communicate to the SixthSense backend address.

Enable proxy using any of the following two methods:

  1. Set proxy at system/container level.


a. Windows Servers: add environment variable in system level variables for HTTP_PROXY, GRPC_PROXY_EXP

b. Linux Servers:

Add proxy in the ~/.bashrc file as follows:
export HTTP_PROXY= && export GRPC_PROXY_EXP=
  1. Pass Proxy to JVM by adding proxy in Java options.
JAVA_OPTS= -Dhttp.proxyHost=ip_address -Dhttp.proxyPort=3128 -Dhttps.proxyHost=ip_address -Dhttps.proxyPort=3128

Configuration on WSO2-EI ESB Server

Add the following entries in the bin/ file of WSO2-EI ESB server.

JAVA_OPTS="$JAVA_OPTS -javaagent:$WSO2_HOME/agent/sixthsense-agent.jar"