CtrlB
Search
K

Installation

  1. 1.
    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
At later point in time, you can update the package to latest version by running: go get -u github.com/ctrlb-hq/heimdall-go
  1. 2.
    Import the heimdall package at the top of your main file as follows:
import (
heimdall "github.com/ctrlb-hq/heimdall-go"
)
  1. 3.
    In your main function, call heimdall.Start() as follows:
heimdall.Start(heimdall.AtlasOptions{
Apikey: "<your-api-key-here>",
})
  1. 4.
    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 modified 4mo ago