RE: Trace parser - capture trace on multiple AOS/batch servers
hi
to capture the trace on the right AOS or batch server in a multithreaded batch job, you can follow these steps:
Open the Dynamics 365 Finance and Operations environment and navigate to System Administration > Setup > Azure Active Directory applications.
Create a new client ID for tracing by selecting "New" and entering a name for the new client ID. Then select the "Generate key" button to generate a new client secret.
Copy the client ID and client secret as you will need them later.
Open the Trace Parser tool in a command prompt window and start the trace capture by entering the following command: TraceParser.exe -StartTrace
Open a new command prompt window and navigate to the folder where your batch job is running.
Set the environment variable DYNAMICSAX_BATCHSERVER to the name of the AOS or batch server you want to capture the trace on.
Set the environment variable DYNAMICSAX_CLIENTID to the client ID you created earlier.
Set the environment variable DYNAMICSAX_CLIENTSECRET to the client secret you generated earlier.
Start your batch job by entering the command to run your batch job.
Once the batch job has finished running, stop the trace capture by returning to the Trace Parser window and entering the following command: TraceParser.exe -StopTrace
This will capture the trace on the AOS or batch server specified in the DYNAMICSAX_BATCHSERVER environment variable and store it in a trace file that you can use for troubleshooting or performance analysis.
DAniele