How to log client tracking id ?

Shekhar Nadide 201 Reputation points
2023-01-30T13:46:56.2433333+00:00

I want to log the client tracking id in Log Analytics workspace. I enabled the log. Not able to see the that property. Could you please tell me how to find the property in the workspace?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
{count} votes

1 answer

Sort by: Most helpful
  1. callyzer 0 Reputation points
    2023-03-13T11:27:17.6366667+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.