Unable to find source request of ai.user, ai.session (cookies) and ai.operationid.
There are two Tracks requests that I can see in Network tab almost on every hit:
a) OPTIONS> dc.services.visualstudio.com/v2/track
b) POST> dc.services.visualstudio.com/v2/track.
This has following Payload that have above mentioned IDs (user,session,operation) and also the Instrumentation Key:
Snippet of the POST track request payload
Want to use the above IDs in subsequent POST requests in the test plan. ai.user can be used because it has expiration of 365 days but not the other two IDs.
How can I handle these dynamic IDs (May be by using Pre & Post Processors) but from where to fetch these values? I cannot find the source for them in the browser.
As per How Application Insights recognizes returning users and efficiently send telemetry data to Azure article the values come with Cookies:
So it's sufficient to add a HTTP Cookie Manager and configure it to store cookies into JMeter Variables by adding the next line to user.properties file
CookieManager.save.cookies=true
once done you will be able to access ai_session cookie value as ${COOKIE__ai_session}
and it would be possible to extract the value before | using Regular Expression Extractor