Linux is assumed for the purposes of this example.
Download and extract the AppDynamics Golang SDK. We will use /opt/appdynamics/src
as the location for the example
Edit this section GoAppDSimpleTest.go:
// Controller
cfg.Controller.Host = "192.168.1.150"
cfg.Controller.Port = 8090
cfg.Controller.UseSSL = false
cfg.Controller.Account = "customer1"
cfg.Controller.AccessKey = "4a2b69dd-31138179c"
- set GOPATH, i.e. export GOPATH=/opt/appdynamics:$GOPATH
- set LD_LIBRARY_PATH, i.e. LD_LIBRARY_PATH=/opt/appdynamics/src/appdynamics/lib:$LD_LIBRARY_PATH
- go run GoAppDSimpleTest.go
- Copy golang-sdk-x64-linux-.tar.bz2 to this directory
- Edit GoAppDSimpleTest.go with appropraite controller connection properties for your configuration
docker build -t appd/simple-golang-example:0.1 .
docker run --rm -v `pwd`/logs:/tmp/appd --name gotest1 appd/simple-golang-example:0.1
From this directory.
The logs will be written into the logs
directory so you can monitor and troubleshoot from the host