How does Dynatrace capture percentage of visits when enabled under Visit Coverage–> Capture following percentage of visits. What is algorithms and on the basis of what it decide the percentage.
Please help to understand this.
One thing to be careful with. This Coverage % ONLY impacts our automatic injection. That means - if you do manual injection we capture everything where our dynatrace agent is injected. Also - if you have CDNs or proxies and they cache a version with an injected agent we will capture them.
I hope this makes sense. more information here: System Profile - User Experience
I was wondering if you know which kind of algorithm Dynatrace uses for determining which visits to instrument and which not to. Also do you happen to know how long it takes to do this calculation at server side?
Thank you very much.
I think its a pretty simple algorithm. If you specify 50% coverage then we generate a random number between 1 and 100 and if the number is <= 50 we inject the agent. Also - please remember that this only impacts our automatic injection. if you have a CDN or proxies that cache your HTML page with an injected dtagent all of your users that get that HTML will be covered
With dynatrace 6.2 we introduced a new way for our manual dtagent injection which provides "bootstrapping" capabilities. So - you simply load a "dtagentbootstrap.js". this will then download the correctd version of your JS file - BUT - it will also check the Visitor Coverage setting
Thank you very much Andreas for your reply.
It makes sense this explanation, still the customer wants a "detailed" explanation of this algorithm. They would like to see a white paper or documentation on this but I don't think there is such document in the community. By any chance do you have a detailed explanation of this process?
Thank you really much, really appreciate your help.
for every new visit the injection state is evaluated once and persisted on the dtCookie. The algorithm works as follows:
Thank you very much for your response. Let me see if I understood correctly how the algorithm works:
injectionPassCount equals the visit coverage and injectionBlockCount equals the difference to reach 100% (in 50% both PassCount and BlockCount equals 50%?).
I assume index is incremented every incoming visit? In this case index would be allowed from 10 to 13, blocked from 14 - 19 and would allow it from index = 20 - 23, blocking from 24 - 29 and so on.
Is that right? Again thank you very much.
Note: as of AppMon 6.2, this statement is no longer true:
"This Coverage % ONLY impacts our automatic injection. That means - if
you do manual injection we capture everything where our dynatrace agent
is injected. Also - if you have CDNs or proxies and they cache a version
with an injected agent we will capture them"
As of AppMon 6.2, the beacon processing has been upgraded so that it adheres to the Visit % Coverage configuration setting as well. So now only the proper amount of visits will be captured based on that desired setting.
Thanks for revert. I have also read link provided by you where its mentioned "Percentage of visits to be captured. For example, if you enter 10% then only each 10th visit of your web site will be captured." does that mean DT will inject dtagent.js for all users but it will capture every 10th user.
The Visitor Coverage % defines for how many visitors the dtagent.js is actually injected. We are not injecting 100% and then throw away data. This % is really controlling the % of visitors that get that dtagent.js file injected. For those where it is injected we capture 100%. Thats also why I mentioned that this has no impact in case you do manual injection. If you manually put dtagent.js on every Visitor we will capture it for all of them - despite the % setting.
In the upcoming 6.2 we have a slight change where we actually provide a Boot Strap dtagent.js that you can use for manual injection. If you úse that boot strap agent the Visit Coverage % will also work as the boot strap agent also checks that setting
Thanks for such sharing useful info. But still I have doubt that how DT controls injection of js and on the basis of what it decide to inject js to capture certain percentage of visits and to control injection it has maintain reference and how does it works.
Now it makes sense. Thanks for detailed information.
We have environment where application is accessed from various branches and we have set UEM to 15%, But client want to enable UEM 15% for all branches so that we can useful data for all branches as per my understanding we can only restrict this per application.
Pls suggest if it can be achieved.
I'm not sure I understand the problem.
If you set the UEM injection rate to 15%, on average 15% of the visits from each branch will be traced. Depending on the number of branches and the number of visits from each branch, the statistical variation should be negligible. I guess I'd like you to build a "Visits split by branch" business transaction so you can see exactly what's happening in your environment.
By the way, you're right that the automatic injection rate is set per application.
In my case branch means we have group of IPs and users are not equally distributed across branches so we can get high visits from few branches and may get minimum visits from few branches so we cant get equal visits from all branches using percentage of visits. So we may not get 15% visits from all branches.
Please rectify if I have misinterpreted this.
Let's suppose you get 100 visits from branch A, 200 visits from branch B and 300 visits from branch C, for a total of 600 visits. At 15%, you want to trace 90 visits total.. Dynatrace will trace 15 visits from branch A, 30 visits from branch B and 45 visits from branch C.
Just for completeness, although you can turn injection on and off by IP address range, the IP address is not taken into account when deciding, if the injection rate is less than 100%, whether to trace a particular visit.