cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clarification about how user sessions are counted?

AntonioSousa
DynaMight Guru
DynaMight Guru

Sessions in Dynatrace are licensed in DEMs, and namely there are at least two situations where real sessions are truncated


Now, if in USQL I do a query like the following

SELECT COUNT(*) FROM usersession WHERE userId="Name of User"

I believe I will get the number of user sessions as they are counted by licensing terms. I have done some examples, but now absolutely sure. What I would like to get is the number of real sessions.

Can someone clarify if it's one way, or the other?

Antonio Sousa
4 REPLIES 4

ChadTurner
DynaMight Legend
DynaMight Legend

back before the days of USQL, on a monthly basis, I would pull the amount of user sessions and number of users from each application and supply them into a spread sheet that tracked our usage for licensing, what months were we over or under our for our licensing, and then conculcated that by quarter, giving us a running total of how we look as the year progresses and if we would expect any overages. The sheet also calculated the overages per our licensing formula. This method got me within $200 of the overage cost at the end of the year.

Now that we have USQL, you wont need to manually get these numbers one by one. You can use this string:

SELECT useraction.application, COUNT(userType) FROM usersession WHERE userType IS "REAL_USER" AND applicationType IS NOT NULL GROUP BY useraction.application ORDER BY count(userType) DESC


-Chad

I think I did not express my question the best way. I've added a comment above to get it clearer...

Antonio Sousa

AntonioSousa
DynaMight Guru
DynaMight Guru

Just to clarify, I would like to know what happens with the query above when a user has an interaction with an application that has 300 continuous user actions.

Would it give 1 or 2?

If it gives 2, is it possible to construct a query that gives 1?

Antonio Sousa

AlexanderSommer
Dynatrace Champion
Dynatrace Champion

Within the Dynatrace UI you will always see the "real" Dynatrace sessions not the sessions counted for licensing. For example if a user sessions is longer than 2 hours you will see it only 1 time in the UI while its counted twice for licensing. But if you look at this session or use USQL you will see the "totalLicenseCreditCount" field set to 2 because of running longer than 2 hours.
The same is for "cross application" sessions. If a user session has user actions from two applications it will be displayed as "ONE" session in the Dynatrace UI but the "totalLicenseCreditCount" will be set two two.
Of course if there are some limits like the 200 user action limit. So a Dynatrace session can't have more than 200 actions while the "real world session" might be longer. The same applies to "real world sessions" where the user accesses two different domains in his "browser session" and of course from technical side, Dynatrace can only connect data where the same cookie can be used.

Featured Posts