Welcome to Microsoft Q&A! Thanks for posting the question.
Yes, your understanding is almost correct - with one modification. itemCount=<sampling ratio>
. Therefore, based on the example in question, for a record if itemCount
is 5 - it would mean that this single record represents 5 telemetry (4 of which were sampled out). Thus itemCount=<sampling ratio> = 5/1 = 5
. Also, the sampled record (both the stored one as well as the discarded out ones) will be independent of each other. The App Insights SDK, however, samples based on operation_Id
, meaning that an operation_Id is selected and all of the telemetry for that single operation are ingested and saved (not random individual records). This enables the end-to-end transaction view of the stored telemetry record.
You may refer to the following links for more details:
1. How sampling works - The example scenario should help clear much of the doubts.
2. StackOverFlow discussion for "Azure App Insights Sampling (ItemCount)"
Please let me know if you have any questions.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.