Skip to main content

Configure the Go agent

The standard configuration for all agents uses this order of precedence, which also details other ways to configure the agent, such as other valid configuration file locations.

There are different ways to configure the Go agent:

  • A YAML configuration file (learn more) is required to run your application. It is not needed to run the Go agent. You can create your own YAML configuration file or use this template that contains all valid properties for the Go agent.

    Place the file in the directory your app will run from "." and then find the agent keys and set these values:

  • You can use environment variables to configure your build.

  • Command line configuration is also available.


Use the Contrast agent configuration editor to create or upload a YAML configuration file, validate YAML and get setting recommendations.

Go YAML template

Use this template to configure the Go agent using a YAML configuration file. (Learn more about YAML configuration.)