ApplicationInsights-JS icon indicating copy to clipboard operation
ApplicationInsights-JS copied to clipboard

Task 6268904: [JS] Provide options for populating the SDK operation id during initialization

Open MSNev opened this issue 4 years ago • 0 comments

Currently, during initialization of the SDK we populate the operation id to a random value.

However, there are some customers that are looking to join the initial server side request (the one that returns the page) with the requests that are sent from the browser.

This is especially important as part of auto attach options when the customer will want to join the requests.

The customer expects to see the same operation_Id values for the requests (server-side) and pageView (client-side) telemetries when visiting a URL in their application. This behavior is described in the official documentation here:

https://docs.microsoft.com/en-us/azure/azure-monitor/app/correlation#example

In the doc's example, for a single page visit the request has an operation_Id of STYz and the pageView also has an operation_Id of STYz.

MSNev avatar Nov 02 '21 23:11 MSNev