This guide helps you diagnose and fix common issues when monitoring Go applications in Kubernetes using the APM Insight Go agent.
The Go agent is not discovering the application
Symptoms: You do not see any logs containing the matched Go process, which means the agent is unable to detect your Go application.
- Required checks:
- Verify that the GO_APPS value in the ConfigMap matches your Go binary name:
kubectl get configmap apm-apps-config -n monitoring -o yaml
- Check the actual binary name inside the application pod to ensure it matches the ConfigMap entry:
kubectl exec -it my-go-app-xxxxx -- ps aux | grep go
- Confirm that the binary has been copied to the hostPath directory used for instrumentation:
kubectl exec -it -n monitoring exporter-agent-xxxxx -- \
ls -lh /var/lib/apm-binaries/bin/
- Ensure the application pod and the exporter-agent pod are running on the same node so that the agent can discover the process:
kubectl get pods -A -o wide | grep -E "my-go-app|exporter-agent"
The eBPF probes are not attaching
- Symptoms: The instrumentor logs contain errors such as Failed to attach uprobe, indicating that the agent could not attach the extended Berkeley Packet Filter (eBPF) probes to the Go binary.
- Required checks:
- Verify that the kernel version is 5.8 or higher, as eBPF instrumentation requires a compatible kernel:
kubectl exec -n monitoring exporter-agent-xxxxx -- uname -r
- Check whether the Go binary is stripped. The binary must contain symbol tables like .gopclntab for eBPF attachment:
kubectl exec -n monitoring exporter-agent-xxxxx -- \
readelf -S /var/lib/apm-binaries/bin/my-go-app | grep -E ".gopclntab|.debug"
- Confirm that the BPF filesystem is mounted correctly inside the agent pod:
kubectl exec -n monitoring exporter-agent-xxxxx -- \
mount | grep bpf
- List the loaded eBPF programs to verify probe attachment:
kubectl exec -n monitoring exporter-agent-xxxxx -- \
bpftool prog list
Permission denied errors are occurring
- Symptoms: The agent logs display messages such as Permission denied or Operation not permitted, indicating insufficient privileges.
- Required checks:
- Verify that the DaemonSet is running in privileged mode:
kubectl get daemonset exporter-agent -n monitoring -o yaml | grep privileged
- Confirm that the security context is configured correctly to allow eBPF operations:
kubectl get daemonset exporter-agent -n monitoring -o yaml | grep -A 10 securityContext
- Ensure that hostPID: true is enabled so the agent can inspect processes across the node:
kubectl get daemonset exporter-agent -n monitoring -o yaml | grep hostPID
No spans are exported from the application
- Symptoms: The instrumentor logs show No spans received, indicating that the application is not generating telemetry or the agent is not exporting it.
- Required checks:
- Ensure the application is actually receiving traffic on the expected port:
kubectl exec -it my-go-app-xxxxx -- netstat -tlnp | grep 8080
- Verify that the exporter agent can communicate with the back end by checking its logs:
kubectl exec -n monitoring exporter-agent-xxxxx -- \
tail -f /opt/S247DataExporter/ logs/service /service.log
- Confirm that the license key in the secret is correct and valid:
kubectl get secret apm-license-key -n monitoring -o yaml
How to upgrade the Go agent
You can perform a rolling update of the agent through the DaemonSet.
# Update image version
kubectl set image daemonset/exporter-agent \
exporter-agent=site24x7/apminsight-go-agent:latest \
-n monitoring
Monitor the rollout to ensure the update is applied successfully:
# Monitor rollout
kubectl rollout status daemonset/exporter-agent -n monitoring
How to uninstall the Go agent
To uninstall the agent, follow these steps:
Delete the DaemonSet:
kubectl delete daemonset exporter-agent -n monitoring
Delete the ConfigMap and Secret:
kubectl delete configmap apm-apps-config -n monitoring
kubectl delete secret apm-license-key -n monitoring
Related article