Skip to content

Commit

Permalink
Merge pull request #336 from nr-swilloughby/291_wait_for_connection
Browse files Browse the repository at this point in the history
added advice on usage of WaitForConnection() call
  • Loading branch information
RichVanderwal committed Jul 9, 2021
2 parents c056c49 + 8400fc0 commit 91068fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions v3/newrelic/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ func (app *Application) RecordCustomMetric(name string, value float64) {
// If Infinite Tracing is enabled, WaitForConnection will block until a
// connection to the Trace Observer is made, a fatal error is reached, or the
// timeout is hit.
//
// Note that in most cases, it is not necesary nor recommended to call
// WaitForConnection() at all, particularly for any but the most trivial, short-lived
// processes. It is better to simply start the application and allow the
// instrumentation code to handle its connections on its own, which it will do
// as needed in the background (and will continue attempting to connect
// if it wasn't immediately successful, all while allowing your application
// to proceed with its primary function).
//
func (app *Application) WaitForConnection(timeout time.Duration) error {
if nil == app {
return nil
Expand Down

0 comments on commit 91068fa

Please sign in to comment.