The most common issue of a process not reporting for the Go agent is that the process ran too fast and our data collectors were not able to collect the data due to the program ending before information being sent back to New Relic. However, since New Relic is software for software engineers we have already thought about how there are plenty of programs that run for less than a minute and shut down. With that being said, there is a Go Agent method you can use for when it comes to getting these fast programs to report.
app.WaitForConnection will wait for the application to connect to the New Relic collector until it times out, errors out, or until all the data has been sent to New Relic. You can find our github documentation of
app.WaitFoConnection here, application.go
You can also see a basic example of how to use this here, Short Lived Process.