編輯

共用方式為


Turn Off or Limit Telemetry Trace Events

APPLIES TO: Business Central on-premises

The application and platform can emit many telemetry trace events, which can be collected using various event trace tools. For example, telemetry trace events are recorded in the Business Central Server channel logs, which you can see in Event Viewer, under Applications and Services Logs > Microsoft > DynamicsNAV > Common > Admin.

The number of events can place a large demand on the logging resources on the computer running the Business Central Server instance. To help alleviate this demand, the Business Central Server instance includes a configuration setting called Diagnostic Trace Level (TraceLevel in the customsettings.config file) that enables you to specify the lowest severity level of customer telemetry trace events that are emitted from the application, or even turn off telemetry events altogether. Custom telemetry trace events have IDs from 700-712.

Note

The logging of events from external proxies uses the configuration setting Diagnostic Trace Level for External Proxies ('ExternalTraceLevel' in the customsettings.config file).

To configure the Diagnostic Trace Level setting, you can use the Business Central Server Administration tool, modify the Business Central Server instance configuration file (CustomSettings.config) directly, or use the Set-NAVServerConfiguration cmdlet of the Business Central Administration Shell.

Tip

Custom telemetry events are generated by calls to the SENDTRACETAG method in code. Learn more in Instrumenting an Application for Telemetry.

Use the Business Central Server Administration tool

Important

Starting in Business Central 2022 release wave 2 (v21), the Business Central Server Administration tool is no longer available. Use the Business Central Administration Shell instead.

  1. To start the Business Central Server Administration tool, select Start, and in the Search programs and files box, type Microsoft Dynamics365 Business Central Administration, and then select the related link.

  2. In the left pane, under Console root, select the Business Central Server instance.

  3. In the center pane, select the Edit button.

  4. Under General, set the Diagnostic Trace Level:

    You use this setting to filter out lower-level events from being emitted. For example, if you set this setting to Error, only Error and Critical events will be emitted.

    Set to Off if you do not want to emit telemetry trace events.

  5. Select the Save button, and then select the OK button.

    You must restart the Business Central Server instance for the changes to take effect.

  6. To restart, the Business Central Server instance, in the left pane, select the Business Central computer.

    Unless you are administering a remote computer, this is Business Central (local).

  7. In the center pane, right-click an instance, and then select Restart.

Modify the CustomSettings.config file

  1. Open the CustomSettings.config file for the Business Central Server instance in a text editor, such as Notepad.

    By default, the file is located in the C:\Program Files\Microsoft Dynamics 365 Business Central\NNN\Service folder or C:\Program Files\Microsoft Dynamics 365 Business Central\NNN\Service\Instances\<instancename> folder (for multitenant installations).

  2. Set the TraceLevel setting to Critical, Error, Warning, Normal (this corresponds to the Information level), Verbose, or Off.

  3. Save the file, and then restart the Business Central Server instance.

Use the Business Central Administration Shell

  1. Start the Business Central Administration Shell.

  2. At the command prompt, run the following command:

    Set-NAVServerConfiguration -ServerInstance MyServerInstance -KeyName TraceLevel -KeyValue level -ApplyTo All
    

    Substitute MyServerInstance with the name of the Business Central Server instance and level with either Critical, Error, Warning, Normal, Verbose, or Off.

Learn more about how to use the Business Central Administration Shell in Business Central PowerShell Cmdlets and Set-NAVServerConfiguration Cmdlet.

Monitoring Business Central Server Events Using Event Viewer
Monitoring Business Central Server Events
Configuring Business Central Server