• /
  • ログイン

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.

ヒント

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 © 2020 New Relic Inc.