• English日本語한국어
  • Log inStart now

StartAgent (.NET agent API)

Syntax

NewRelic.Api.Agent.NewRelic.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 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.

Tip

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

Examples

NewRelic.Api.Agent.NewRelic.StartAgent();
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.