Installation
Download our go heimdall agent by running the following command inside your application folder. This add the heimdall agent to the
go.mod
file:
go get -d github.com/ctrlb-hq/heimdall-go
Import the heimdall package at the top of your main file as follows:
import (
heimdall "github.com/ctrlb-hq/heimdall-go"
)
In your
main
function, callheimdall.Start()
as follows:
heimdall.Start(heimdall.AtlasOptions{
Apikey: "<your-api-key-here>",
})
Use these build flags while building your application:
go build -gcflags="all=-N -l"
Avoid setting -w
and -s
ldflags. Doing so causes the compiler to strip the debug symbols from the binary which is needed by our agent.
If you're building on Alpine, remember to add tags -tags=alpine
.
Last updated