Use Performance Monitor to collect event trace data
APPLIES TO: Business Central on-premises
This topic describes how to use Windows Performance Monitor to collect event trace data for Business Central Server. To collect trace event data, you create a Data Collector Set, and then start the Data Collector Set.
Create a data collector set for collecting Business Central trace event data
Start Windows Performance Monitor.
- Select Start, in the Search box, type perfmon, and then select the related link.
In the navigation tree, expand Data Collector Sets, right-click User-defined, select New, and then select Data Collector Set.
On the Create new Data Collector Set Wizard page, enter a name for the new data collector set, select Create manually (Advanced), and then select the Next button.
On the What type of data do you want to include page, select the Event trace data check box, and then select the Next button.
On the Which event trace providers would you like to enable page, select the Add button to add a provider.
In the Event Trace Providers list, select Microsoft-DynamicsNAV-Server, and then select the OK button.
If you want to collect data for all trace events, select the Next button. If you want to collect data on specific trace events, do the following:
In the Properties list, select Keywords (Any), and then select the Edit button.
On the Property page, in the Manual box, type the keyword decimal value for the trace event. For a list of keyword values for trace events, see Business Central Server Trace Events.
For example, if you want to collect data on service call trace events, then type 4. If you want to collect data on more than one trace event, add the keyword values for each trace event and then use the sum in the Manual box. For example, if you want to collect data on service calls (keyword decimal value = 4) and AL functions (keyword decimal value = 8), then use the value 12.
Note
Performance Monitor will automatically convert the value to hexadecimal, such as 0x4 or 0xC. You can also enter the keyword hexadecimal values directly.
Select the OK button, and then Next button.
On the Where would you like the data to be stored page, set the Root directory box to the folder where you want to save the event trace log file that is generated when you run the Data Collector Set.
Select the Finish button to complete the wizard
The new Data Collector Set appears under User Defined in the navigation pane.
Complete the next procedure to increase trace buffer settings to make sure that events are not dropped when collecting trace event data.
Change the data collector set trace buffers
In the navigation pane, select the new Data Collector Set.
In the main pane, right-click the DataCollector01 item, and then select Properties.
In the Properties dialog box, select the Trace Buffers tab.
Set the following properties.
Property Recommended minimum values Buffer size 128 Minimum buffers 50 Maximum buffers 50 You might have to adjust these properties based on the monitoring sessions and expected number of events that will be collected. If a large number of events are collected, then the trace buffer size and count might have to be increased.
Select the OK button to save and close the Properties dialog box.
To start and stop a Data Collector Set
To start to collect data, right-click the Data Collector Set, and then select Start.
To stop collecting data, right-click the Data Collector Set, and then select Stop.
For information about how to schedule a time to start and stop collecting data, see Schedule Data Collection in Windows Performance Monitor.
The collected event trace data is stored in an event trace log (.etl) file in the location that you specified. You can view the data in the log file by using various industry-standard tools, such as PerfView. Learn more about how to use PerfView to view the event trace data in Use PerfView to View Event Trace Data.
Related information
Monitoring Business Central Server events
Use PerfView to view event trace data
Instrumenting an application for telemetry