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

Which metric hold the information regarding mobile current/live users count?

Yosi_Neuman
DynaMight Champion
DynaMight Champion

Hi guys,

Customer ask to put the number of current users of a mobile app on the data explorer tile in order to give it some nice colors and size it to fit a NOC dashboard but we didn't find anywhere a metric for that...

 

The information is shown in the Mobile infographic 

Yosi_Neuman_3-1649858503383.png

And in Mobile tile 

Yosi_Neuman_2-1649858479023.png

But we could not find this information in any metric.

Can you guys help and explain where is this missing metric!?

All the best and stay safe

Yos  

 

 

 

dynatrace certificated professional - dynatrace primer partner - Matrix Soft Ware Division - Israel
14 REPLIES 14

mark_bley
Dynatrace Advisor
Dynatrace Advisor

Hi @Yosi_Neuman

you can define such a tile for a dashboard using USQL, for the user with e.g.:

 

select count(*) as "Users" from usersession

 

You can run that under User sessions > User sessions query and once you are happy with the result on that page you will be able to pin the result to a dashboard.

mark_bley_0-1650561357329.png

Best,

Mark

 

@mark_bley this is not the desired value. The dashboard tile shows active users. The USQL will show results from finished sessions only. That's a different value and it will never match.

Certified Dynatrace Master | TEMPEST a.s., Slovakia, Dynatrace Master Partner

That is correct, then maybe the metrics you are looking for could be builtin:apps.other.userCount.osAndVersion-std or builtin:apps.other.userCount.osAndGeo

Unfortunately, no values of those metrics do not match the value on the infographic and dashboard tile. I get 3x the value from the metric compared to the value on the infographic. 

Certified Dynatrace Master | TEMPEST a.s., Slovakia, Dynatrace Master Partner

I get very close (off by 1) with following query

builtin:apps.other.userCount.osAndVersion-std:filter(and(in("dt.entity.device_application",entitySelector("type(mobile_application),entityName.equals(~"<APP_NAME>~")")))):splitBy():value:auto:sort(value(sum,descending)):limit(100)

 

Peter_Ralston
Helper

There is no clear answer hear as Dynatrace does not actually expose the live sessions, it is 'in memory' only and the values you see on the application and user sessions screen under 'live' are not retrievable via usql or metrics. 

 

There are 2 options, 

 

1. As mentioned above, use usql

 

This is going to have to be delayed data (e.g what happened last hour) based on the completion of user sessions, so will never be entirely accurate for what you want, since it's only going to give you closed sessions. 

 

example queries below.

 

SELECT count(distinct UserId) as 'Current Unique UserID' FROM usersession
Where useraction.application IN ("xxx") and userId IS NOT NULL

 

SELECT count(distinct UserId) as 'Sessions with Errors' FROM usersession
Where useraction.application IN ("xxx") and userId IS NOT NULL and useraction.requestErrorCount > 0

 

2. The better alternative is to use the inbuilt calculated metrics

 

builtin:apps.web.activeUsersEst

builtin:apps.web.activeSessions

builtin:apps.other.userCount.osAndVersion-std

 

Peter_Ralston_1-1650587807767.png

 

These will give you Dynatrace pre calculated 'estimated' number of active users and sessions.  it is split between mobile & web, so you might need to show this data separately.

 

Anyway, good luck 

@Peter_Ralston  I don't think the value is "in memory only", since it's not the actual value. If you change the time frame, the value changes.

For illustration this is a sample dashboard in the Demo environment (link😞

Julius_Loman_1-1650609969387.png

 

Time frame is set to yesterday in the screenshot. You can see the metrics mentioned above by @mark_bley have the same value (expected). It's roughly the count of user session using USQL (expected). The number of users is higher (third metric). 
However, you can see a significant difference between the mobile app tile value and other values. For days before yesterday, I can see an even bigger difference (4.8k vs 12k).

@Yosi_Neuman were you able to find the source? I start suspecting the value in the tile and infographic is wrong.



Certified Dynatrace Master | TEMPEST a.s., Slovakia, Dynatrace Master Partner

Hi @Julius_Loman 

IMO /rest/startscreen/data/MOBILE_APPLICATION is looking as the "The Usual Suspects" here.

Yosi_Neuman_1-1650611660483.png

HTH

Yos 

 

dynatrace certificated professional - dynatrace primer partner - Matrix Soft Ware Division - Israel

Sure it is, but that's only a facade. It does not reveal the actual data source.

Certified Dynatrace Master | TEMPEST a.s., Slovakia, Dynatrace Master Partner

It is working for me also on the demo tenant, please find here an internal link to the dashboard or the public one here

The queries used are:

builtin:apps.other.userCount.osAndVersion-std:filter(and(in("dt.entity.device_application",entitySelector("type(mobile_application),entityId(~"MOBILE_APPLICATION-773D0C09E8E14B58~")")))):splitBy():value:auto:sort(value(sum,descending)):limit(10)

 

mark_bley_0-1650612598168.png

Best,

Mark

 

Ok, yes. I focused on the sessions metrics. I agree this is finally the same metric as in the tile.

Still curious how the metric (builtin:apps.other.userCount.osAndVersion-std) is calculated as it seems it does not match the count of users using USQL or sessions.

Certified Dynatrace Master | TEMPEST a.s., Slovakia, Dynatrace Master Partner

Hi Mark, can you please explain, how this metric (and similarly, web metric estimated user count builtin:apps.web.activeUsersEst) is calculated ?

Thanks

Rasto

Thank you @mark_bley & @Julius_Loman  for helping out and find the way to show the number of mobile users as shown in mobile application and tile from a metric, but your answer Mark raised another question :face_with_monocle: regrading which metric holds the information that Live user activity tile shows

Yosi_Neuman_2-1650623028794.png

And when drill down into this tile and split them by application is shows the live session 

Yosi_Neuman_1-1650623007729.png

Is there a metric that holds this information too that we can put on a dashboard?

Thanks in advance 

All the best and stay safe

Yos 

 

dynatrace certificated professional - dynatrace primer partner - Matrix Soft Ware Division - Israel

Hi @Yosi_Neuman,

I am afraid at the moment there is no way to recreate that exact metric since there is no dimension (or USQL parameter) to filter out live sessions. See here for more information