Install New Relic for Go

Install the Go agent to monitor your Go language apps and microservices using our launcher or following the instructions below.

Compatibility and requirements

The Go agent requires Golang 1.7 or higher on Linux, macOS, or Windows. For full compatibility information, see Go agent compatibility and requirements.

Install the Go agent

In order to install the Go agent, you need a New Relic license key. Then, to install the agent:

  1. From, use your preferred process; for example:

    go get
  2. Import the package in your application.
  3. Initialize the Go agent by adding the following in the main function or in an init block:

    app, err := newrelic.NewApplication(
        newrelic.ConfigAppName("Your Application Name"),
  4. Instrument web transactions by wrapping standard HTTP requests in your app code. For example:

    http.HandleFunc(newrelic.WrapHandleFunc(app, "/users", usersHandler))
  5. Instrument other transactions you want to monitor.
  6. Optional: Instrument segments for an extra level of timing detail.
  7. Compile and deploy your application.

View your app's data in New Relic

Wait a few minutes for your application to send data to New Relic. Then, check your app's performance in the APM UI. If no data appears within a few minutes, follow the troubleshooting tips.

Keep your agent up to date

To take full advantage of New Relic's latest features, enhancements, and important security patches, keep your app's Go agent up to date.

For more help

If you need more help, check out these support and learning resources: