Application Tracker is part of an overall effort to help expose Finance and Operations telemetry to customer and partners. It will allow you to collect detailed performance traces and send them to an Application Insights instance in your own Microsoft Azure subscription. Application Insights enables advanced querying and analytics tools on top of this telemetry. Application Tracker is available for development and test environments.
- Statistics on database interactions by table with details based on access type.
- Statistics on direct SQL statements per operation
- Statistics on requests to access the GlobalObjectCache
- Statistics on creation and disposal of user connections
- Statistics on customer forms and extension models (Planned for a future release)
- General SQL performance metrics
Here’s how you can configure it
Create an App Insights subscription
- Go to Azure portal and click on the Create a resource action
- In the Search the Marketplace control enter Application Insights
- Fill in the resource information and complete the setup process
- Take note of the Instrumentation Key associated with the subscription
Configure the local development environment to publish telemetry data
- Click the File Explorer icon in the Task bar at the boom of the screen
- Navigate to <Service Driver>:AOSServicewebroot and locate the web.config file
- Press Right + click and then select Open with > Notepad
- Add the following key <add key=”Microsoft.Dynamics365.AppTracker.AppInsightsKey” value=”<PASTE INSTRUMENTATION KEY HERE>” />
Restart the service to initiate telemetry data broadcast
- Click Start and open Command Prompt
- Recycle the services using the command: iisreset
- Give it 5-10 min for refresh period cycle latency
Use the application ….
Where do I find the telemetry
All telemetry exists in the windows event log under the Application Tracker folder. In addition, setting up Application Insights as described earlier will upload the telemetry and allow you to take advantage of powerful analytical tools.
Go to your Application insight page in the Microsoft Azure portal and click on Logs (Analytics).
Application Tracker Logs are in the tables named requests and dependencies. I find it more useful to work with the dependencies table. Browse the different fields in the dependencies table to get an idea of the data that is collected. The customDimensions and CustomMeasurements container fields provide addition information regarding tables, SQL, and performance. Get familiar with the query language and analytics tools.
I encourage you to play with the query language and browse the data in customDimensions and CustomMeasurements.
This query will return the last 50 records in the dependencies table. Execute it and browse through the results.
| limit 50
This is a sample query that returns the slowest 10 operations in the last 7 days. It renders the result in a pie chart.
| where timestamp > ago(7d)
| sort by duration desc | render piechart
| project operation_Name, duration
| limit 10
This query returns the slowest operation in the last 7 days, based on the compute time spent. It also projects (displays) the names of the tables that were accessed during the operation.
| where timestamp > ago(7d)
| extend timeInCompute = customMeasurements.['(SQLInsightsTracker) Total time spent in Compute (ms)']
| extend tablesAccess = customDimensions.['(TableAccessTracker) Tables']
| project operation_Name, timeInCompute, tablesAccess, customDimensions, customMeasurements
| sort by toint(timeInCompute) desc
| limit 20
Make use of the activity ID
customDimensions.['ActivityID'] to aggregate operations by activity.