Install Go agent with Contrast installer
You can build and install the Go agent by completing the following two steps. Alternatively, you can also use the Agent Wizard by selecting Language-specific > Go > Install manually.
Build and install the agent
Run the following command:
go run github.com/contrast-security-oss/contrast-go-installer@latest latest
Optionally specify a specific version instead of
latest.The installer places
contrast-goin the directory set by GOBIN. If GOBIN is not set, it uses the bin directory under the first entry inGOPATH. Make sure that directory is on your PATH.Replace
gowithcontrast-goin the command you usually use to build the application. For example:contrast-go build -o app ./app
The resulting executable will be instrumented with Contrast, and the agent automatically starts when you run the application.
Configure the agent
See Configure Go agent to learn more.
Verify the agent deployment
Interact with your application as you normally would. For example, interact with your application's web interface or send API commands.
In the Agent Wizard, select View agent activity to verify that your agent appears in the agents list.
Verify that you see the name of your application in the applications list.
In Northstar, select Applications from the left navigation.
In Contrast, select Applications from the header.
Verify that you see the name of your local server in the servers list.
In Northstar, select Servers from the left navigation.
In Contrast, select Servers from the header.