StartAgent

StartAgent()
Start the agent if it hasn't already started. Usually unnecessary.

Requirements

Agent version 5.0.136.0 or higher.

Compatible with all app types.

Description

Starts the agent if it hasn't already been started. This call is is usually unnecessary, since the agent starts automatically when it hits an instrumented method unless you disable autoStart. If you use SetApplicationName(), ensure you set the app name before you start the agent.

This method starts the agent asynchronously (that is, it won't block app startup) unless you enable syncStartup or sendDataOnExit.

Example(s)

NewRelic.Api.Agent.NewRelic.StartAgent();