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.zip "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/4/packages/generic/sixthsense/{{AGENT_VERSION}}/agent.zip"
  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.
AGENT_HOME="$WSO2_HOME/agent"
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

note

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.

Example:

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= 10.0.0.1:3128 && export GRPC_PROXY_EXP=10.0.0.1:3128
  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/integrator.sh file of WSO2-EI ESB server.

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