To log the client tracking ID in Log Analytics workspace, you need to make sure that the property is included in the logs that are sent to the workspace. Here are the steps to follow:
Check that the client tracking ID is included in the logs that are sent to the workspace. You can do this by checking the schema of the log. For example, if you are using Azure Application Insights, you can check the schema of the custom events by going to the "Analytics" section of the Application Insights resource, and running the following query:
sql
union traces, customEvents
| where timestamp > ago(24h)
| limit 1
This query will show you the schema of the traces and custom events logs, which should include the client tracking ID property if it is being logged.
If the client tracking ID is included in the logs, you can search for it in the Log Analytics workspace by running a query. For example, if the property is called "clientTrackingId", you can run the following query:
bash
traces
| where clientTrackingId == "your-client-tracking-id"
This query will return all traces that have the specified client tracking ID.
If the client tracking ID is not included in the logs, you need to update the application code or configuration to include it. This may vary depending on the application you are using, but generally involves updating the log configuration or adding custom instrumentation to the application.
Once you have confirmed that the client tracking ID is being logged and have updated your code or configuration if necessary, you should be able to search for it in the Log Analytics workspace using a query.
A suitable call tracking solution can also helps nowadays as the new updates of the software is amazing.