Skip to main content

Installing the docker Go

At the bottom of Management > Agent installation, click Install Application, and then Select the Docker Go tab in Install guide.

This process applies the WhaTap monitoring agent to the Go application running on the Docker container and packages the container image as follows.


EKS Fargate is to be supported later.

Download agent

Install the whatap-agent package when building your Go application docker image.

Red Hat/CentOS
RUN rpm -Uvh
RUN yum install -y whatap-agent


Create the whatap.conf file in which WhaTap's access key and server IP address have been set in the user application execution path. If you use a specific path, you can set it with the WHATAP_HOME environment variable.

RUN echo "accesskey={Access Key}" >> whatap.conf 
RUN echo "{Collection Server IP Address}" >> whatap.conf

Be careful not to expose the access key to images that are in Docker Public status.

Setting the WHATAP_HOME variable

You can set the whatap.conf path as the WHATAP_HOME variable. Create the WHATAP_HOME path first. Add the WHATAP_HOME setting before the application startup command.

mkdir ./whatap_home
echo "license={Access Key}" >> ./whatap_home/whatap.conf
echo "{Collection Server IP Address}" >> ./whatap_home/whatap.conf

# run application
WHATAP_HOME=./whatap_home ./app

Configuring the Go library

Add the package to the Go application source code.

go get

Configure for initialization and shutdown with the trace.Init() and trace.Shutdown() functions. Set the startup and end for transactions with the trace.Start() and trace.End() functions.

import ""

func main(){
//It must be executed before closing the app.
defer trace.Shutdown()

ctx, _ := trace.Start(context.Background(), "Start Tx")


trace.End(ctx, err)

For more information about the library configuration, see the following.

Configuring the container environment variables

After building Docker, set container environment variables in the Kubernetes environment. Add the following items in the yaml file for releasing the application.

- name: NODE_IP
valueFrom: {fieldRef: {fieldPath: status.hostIP}}
- name: NODE_NAME
valueFrom: {fieldRef: {fieldPath: spec.nodeName}}
- name: POD_NAME
valueFrom: {fieldRef: {fieldPath:}}

See the following example:

apiVersion: v1
kind: Pod
name: # Pod Name
labels: # Pod Labels
- name: NODE_IP
valueFrom: {fieldRef: {fieldPath: status.hostIP}}
- name: NODE_NAME
valueFrom: {fieldRef: {fieldPath: spec.nodeName}}
- name: POD_NAME
valueFrom: {fieldRef: {fieldPath:}}

Roles of environment variables

  • NODE_IP: Collects the IP address of the node where the current Pod has been hosted.

  • NODE_NAME: Collects the name of the node where the current Pod is running.

  • POD_NAME: Collects the name of the current Pod.

Running the agent

Add the whatap-agent startup command before the application startup command.

sh -c "/usr/whatap/agent/whatap-agent start && [application startup command]"

Execute the following command to check whether the WhaTap service has been run normally. When the application server runs, it begins collecting monitoring information.

ps -ef | grep whatap_agent

Checking the agent installation

To check whether the agent has been installed, go to Dashboard > Application service dashboard.

If you have manually installed the downloaded file but cannot see the agent in Dashboard, check the following.

  • Execute the command, ps -ef | grep whatap_agent in the container, and then check whether the agent options have been applied properly.

  • Check the WHATAP_HOME/logs of the container or the logs directory of the application execution path. The file name of the agent log is displayed as logs/{boot or install}-yyyymmdd.log.