Install Agent
OpenTelemetry monitoring is a Beta version so unexpected errors may occur. It is not recommended for using it for sensitive data or in the operation environment. If you have any feedback or issues, feel free to contact the support team at support@whatap.io.
It guides you how to install the OpenTelemetry agent.
Download agent
Execute the following command to download the agent to the instance where the OpenTelemetry Collector has been installed.
- Red Hat/Centos
- Debian/Ubuntu
- Amazon Linux
- Alpine Linux
- Alpine Linux Docker
# Register package repository
$ sudo rpm -Uvh https://repo.whatap.io/centos/5/noarch/whatap-repo-1.0-1.noarch.rpm
# Install package
$ sudo yum install whatap-otel
# Register package repository
$ wget https://repo.whatap.io/debian/release.gpg -O -|sudo apt-key add -
$ wget https://repo.whatap.io/debian/whatap-repo_1.0_all.deb
$ sudo dpkg -i whatap-repo_1.0_all.deb
$ sudo apt-get update
# Install package
$ sudo apt-get install whatap-otel
# Register package repository
$ sudo rpm --import https://repo.whatap.io/centos/release.gpg
$ echo "[whatap]" | sudo tee /etc/yum.repos.d/whatap.repo > /dev/null
$ echo "name=whatap packages for enterprise linux" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
$ echo "baseurl=https://repo.whatap.io/centos/latest/\$basearch" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
$ echo "enabled=1" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
$ echo "gpgcheck=0" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
# Install package
$ sudo yum install whatap-otel
$ wget https://s3.ap-northeast-2.amazonaws.com/repo.whatap.io/alpine/x86_64/whatap-otel.tar.gz
$ tar -xvzf whatap-otel.tar.gz -C /
FROM alpine
RUN apk update && apk upgrade
# Install WhaTap Go monitoring agent
RUN wget https://s3.ap-northeast-2.amazonaws.com/repo.whatap.io/alpine/x86_64/whatap-otel.tar.gz
RUN tar -xvzf whatap-otel.tar.gz -C /
Default agent settings
To configure the agent, the WhaTap project's access key and collection server IP address are required. In WhaTap monitoring service, move to the project for the application product. In Management > Agent Installation, check the access key and collection server IP address for preparation.
Configuring the whatap.conf file
Set the access key and collection server IP address in the agent configuration (whatap.conf) file.
echo "accesskey={ACCESS_KEY}" >> /usr/whatap/otel/whatap.conf
echo "whatap.server.host={COLLECTOR_SERVER_IP_ADDRESS}" >> /usr/whatap/otel/whatap.conf
Configuring with environment variables
You can set the access key and collection server IP address as environment variables.
WHATAP_ACCESSKEY={ACCESS_KEY}
WHATAP_SERVER_HOST={COLLECTOR_SERVER_IP_ADDRESS}
WHATAP_OTEL_GRPC_SERVER_PORT={gRPC_SERVER_LISTENING_PORT}
If both environment variables and the whatap.conf file have been configured, the settings in the whatap.conf file take precedence.
Docker installation
If you have the Opentelemetry Collector installed, you can run whatap-otel with a Docker container to receive data from the collector to the GRPC 6600 port.
docker pull whatap/whatap-otel
version: '3.7'
services:
whatap_otel:
image: whatap/whatap-otel:latest
environment:
WHATAP_ACCESSKEY: x605111111111-z11111111-x1111111111m
WHATAP_SERVER_HOST: 1.1.1.1/2.2.2.2
WHATAP_OTEL_GRPC_SERVER_PORT: 6600
otel_metric_server_enabled: true
otel_log_server_enabled: true
log_stdout_enabled: true
#debug_otel_grpc_server_enabled: true
ports:
- 6600:6600
Kubernetes installation
The following is a deployment example that creates the OpenTelemetry Collector and whatap-otel together in a single Pod.
metadata:
name: otel-collector-deploy
spec:
replicas: 1
selector:
matchLabels:
app: otel-collector
template:
metadata:
name: otel-collector-pod
labels:
app: otel-collector
spec:
containers:
- name: otel-collector
image: otel/opentelemetry-collector-contrib:0.106.0
ports:
- containerPort: 4317 # OTLP gRPC
- containerPort: 4318 # OTLP HTTP
volumeMounts:
- name: config-volume-otelcol
mountPath: /etc/otel/config.yaml
subPath: otel-collector-config.yaml
args: ["--config", "/etc/otel/config.yaml"]
- name: whatap-otel-agent
image: whatap/whatap-otel:latest
ports:
- containerPort: 6600
env:
- name: "WHATAP_ACCESSKEY"
value: "x605111111111-z11111111-x1111111111m"
- name: "WHATAP_SERVER_HOST"
value: "1.1.1.1/2.2.2.2"
- name: "otel_metric_server_enabled"
value: "true"
- name: "otel_log_server_enabled"
value: "true"
- name: "log_stdout_enabled"
value: "true"
- name: NODE_IP
valueFrom: {fieldRef: {fieldPath: status.hostIP}}
- name: NODE_NAME
valueFrom: {fieldRef: {fieldPath: spec.nodeName}}
- name: POD_NAME
valueFrom: {fieldRef: {fieldPath: metadata.name}}
- name: whatap.micro.enabled
value: "true"
volumes:
- name: config-volume-otelcol
configMap:
name: otelcol-config
apiVersion: v1
kind: ConfigMap
metadata:
name: otelcol-config
data:
otel-collector-config.yaml: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
otlp:
endpoint: "127.0.0.1:6600"
tls:
insecure: true
logging:
loglevel: debug
processors:
batch:
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp, logging]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlp, logging]
logs:
receivers: [otlp]
processors: [batch]
exporters: [otlp, logging]
Configuring the Opentelemetry Collector
Configure the OTLP Exporter to forward data to whatap-otel.
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
processors:
batch:
exporters:
logging:
# Configure the OTLP exporter to target whatap-otel.
otlp:
endpoint: 127.0.0.1:6600
tls:
insecure: true
service:
pipelines:
traces:
receivers:
- otlp
processors:
- batch
exporters:
- logging
- otlp
telemetry:
logs:
level: debug #activate debug mode
-
End point (
endpoint) setting:127.0.0.1:6600The default port for local agents is 6600.
-
tls.securesetting:insecure: true -
The gzip compression settings are used by default. (gzip is used)
For more information about the OpenTelemetry Collector installation, see the following link.
Other platforms
Tyk Gateway
Enable the OpenTelemetry function of Tyk Gateway and then check the transaction information through the OpenTelemetry Collecotr.
- Connect the OpenTelemetry Collector to the Tyk Gateway.
{
"log_level": "debug" ,
"listen_port": 8081,
...
"opentelemetry": {
"enabled": true,
"endpoint": "111.222.333.444:4317",
}
}
- When the whatap-otel agent is connected to the OpenTelemetry Collector, trace data is collected.
Kong Gateway
By configuring the built-in OpenTelemetry plugin in Kong Gateway, you can monitor transaction data through the OpenTelemetry Collector.
Specify the OpenTelemetry Collector endpoint in the OpenTelemetry plugin. When the Whatap-otel agent connects to the Collector, trace data will be collected.
-
kong.conf
Enable trace settings.
tracing_instrumentations = all
tracing_sampling_rate = 1 -
OpenTelemetry Plugin Configuration
Register the endpoint URL of the OpenTelemetry Collector.
The default OTLP receiver settings are as follows:
- Protocol: http
- Port: 4318
- URL:
- Trace: /v1/traces
- Log: /v1/logs
-
Example default settings
traces_endpoint: http://otelcollector:4318/v1/traces
logs_endpoint: http://otelcollector:4318/v1/logs -
Example kong.yaml configuration
plugins:
- name: opentelemetry
config:
traces_endpoint: http://otelcollector:4318/v1/traces
logs_endpoint: http://otelcollector:4318/v1/logs
resource_attributes:
service.name: kong-otel -
Example plugin configuration via Admin API
curl -X POST http://localhost:8001/services/plugins \
--header "accept: application/json" \
--header "Content-Type: application/json" \
--data '
{
"name": "opentelemetry",
"config": {
"traces_endpoint": "http://otelcollector:4318/v1/traces",
"logs_endpoint": "http://otelcollector:4318/v1/logs",
"resource_attributes": {
"service.name": "kong-dev"
}
}
}
'
- Supported version: Kong Gateway 3.3.x or higher
For more detailed configuration instructions, refer to the following documentation.
Starting the monitoring
-
If the application server is restarted after all settings are made, the agent collects data. Go to the Dashboard > Application dashboard menu and then perform monitoring for the collected data in real time.
-
For more information about the agent configuration, see the following.