• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by sachin s. · May 07, 2015 at 08:33 AM · web performance monitoring

Visit Coverage - Capture percentage of Visits

Hi,

 

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.

 

Sachin 

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

8 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Andreas G. · May 07, 2015 at 02:41 PM

Hi Sachin

the "Visit Coverage" will impact our automatic injection of our JavaScript agent. It says that in the help and in the statusbar of that setting. So - for example. If you set it to 50% we will only inject our dtagent on web rquests for every other real visitor you have. It means we only capture UEM data for 50% of your users.

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

Comment
Laurent I.

People who like this

1 Show 7 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Marco A. · Jun 29, 2015 at 06:42 PM 0
Share

Hi Andreas

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.

Axel

avatar image Andreas G. ♦ Marco A. · Jul 01, 2015 at 03:44 PM 0
Share

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

Andi

avatar image Marco A. Andreas G. ♦ · Jul 08, 2015 at 03:17 PM 0
Share

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.

Axel

avatar image Clemens F. Marco A. · Jul 09, 2015 at 11:35 AM 0
Share

Hi Axel,

for every new visit the injection state is evaluated once and persisted on the dtCookie. The algorithm works as follows:

  • injectionPassCount and injectionBlockCount are calculated from visit percentage, e.g. for 30% injectionPassCount=3 and injectionBlockCount=7
  • for each shouldBlockByPercentage call an index is incremented by 1
  • shouldBlockByPercentage = ( ( index % (injectionPassCount + injectionBlockCount) ) >= injectionPassCount )
  • index=11: 11 % 10 = 1 -> 1 < 3 -> not blocked
  • index=17: 17 % 10 = 7 -> 7 > 3 -> blocked

hth,
Clemens

avatar image Marco A. Clemens F. · Jul 10, 2015 at 09:33 PM 0
Share

Hi Clemens

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.

Best

Axel

avatar image Clemens F. Marco A. · Jul 15, 2015 at 05:19 AM 0
Share

Hi Alex,

yes, basically the algorithm works this ways.

best,
Clemens

avatar image Rob V. · Jul 28, 2016 at 04:31 PM 0
Share

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.

Rob

avatar image

Answer by Graeme W. · May 14, 2015 at 01:24 PM

Sachin,

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.

If you want to trace an equal number of visits from each branch, in this example 30 visits from each branch, you'll need use manual injection and add JavaScript code to your web pages.  Note that this can break down if the distribution of visits is too uneven.  For example, if you get 190 visits from one branch and 10 visits from another, you can't trace 15 visits from each branch because one branch only got 10 visits.

The problem for Dynatrace is that even if the branch name was visible somewhere in the transaction, it would be discovered too late to affect JavaScript agent injection.

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.

-- Graeme

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Graeme W. · May 13, 2015 at 11:57 AM

Sachin,

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.

If you need something more exact than the random method the automatic injection mechanism uses, you'll need to code something yourself in JavaScript.  Since this will be simpler in version 6.2, my strong recommendation is to at least see what happens using the automatic mechanism for the next few weeks.

By the way, you're right that the automatic injection rate is set per application.

-- Graeme

 

Comment

People who like this

0 Show 1 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image sachin s. · May 14, 2015 at 12:54 PM 0
Share

HI Graeme,

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.


Sachin

avatar image

Answer by sachin s. · May 13, 2015 at 07:47 AM

Hi Graeme,


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.

 

Sachin 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Graeme W. · May 11, 2015 at 03:33 PM

Sachin,

The injection of the JavaScript element is done either by a module loaded into the web server (e.g., for Apache or IIS), or by the agent in the front-end tier (e.g., for Java).  I'll refer to either as an agent.

The agent recognizes a web request as representing a new visit because it doesn't include the Dynatrace session cookie.  The agent then decides, based on the configured injection percentage, whether to instrument this visit.  If the visit is going to be instrumented, the agent injects the JavaScript element into the response and attaches a new Dynatrace cookie.  If the visit is not going to be instrumented, the agent just attaches the cookie.

The agent keeps track of which cookies represent instrumented visits and which represent uninstrumented visits.  When a web request comes in with a cookie for an instrumented visit, the JavaScript element is injected into the response.

-- Graeme

 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by sachin s. · May 11, 2015 at 06:13 AM

Hi Andi,

 

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.

Sachin. 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Andreas G. · May 08, 2015 at 10:10 AM

Hi Sachin

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

Andi

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by sachin s. · May 08, 2015 at 07:09 AM

Hi Andreas,

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.


Sachin.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

UEM data sent back to the appserver in what format is it in?

Monitoring a specific web client response (zooms, etc)

Not able to see purepath for visits

UEM Tag Visit - The value does not appear always

Long PurePath Action

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A