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

Does DT capture the exact network type (ex:3G/4G/wifi) for [web application's] sessions?

Aboud
Visitor

I tried to retrieve web sessions for my web application to determine the network type (such as 3G or 4G) that users are using, but no sessions are being returned. Could you assist me in resolving this issue?

Here is the query I used:

SELECT * FROM usersession

WHERE useraction.application = "my_web_app" AND usersession.networkTechnology IN ("3G", "2G", "4G", "5G", "802.11x", "CTRadioAccessTechnologyHSDPA", "CTRadioAccessTechnologyLTE")

This query works for mobile apps, and sessions are successfully retrieved. However, when querying for web app sessions, no data is returned. Could you please help me understand why the query works for mobile apps but not for web sessions?

4 REPLIES 4

PacoPorro
Dynatrace Leader
Dynatrace Leader

Mobile apps often have more direct access to device and network information, while web applications are more restricted due to browser security measures as web browsers generally do not expose detailed network type information (like 3G, 4G, etc.) to web applications for privacy and security reasons,
You can add user session properties to you web applications with the dtrum API
https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum_types.DtrumApi.html#sendSession...
and the network information API https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API

 

ChadTurner
DynaMight Legend
DynaMight Legend

@Aboud - you are looking for "Effective connection type" for web apps:

ChadTurner_0-1735565022937.png

Mobile sessions list is as Network Technology and Connection Type:

ChadTurner_4-1735567188334.png

I'll have to check, but I'm thinking there is a split between the two being Web Vs Mobile. 

 

 

 

 

-Chad

RohitBisht
Dynatrace Advisor
Dynatrace Advisor

As per my knowledge it is not captured by web application, if you run below query, the connection type is "UNKNOWN" mostly.
Probably because of different browsers.
select connectionType FROM usersession WHERE applicationType="WEB_APPLICATION"

There is one way to capture this for one of the browsers:
NetworkInformation: effectiveType property - Web APIs | MDN

The_AM
Dynatrace Champion
Dynatrace Champion

The mobile app session data attempts to obtain the details from device. It stores these within the user session table, which is why it can be queried.

Conversely, web applications has this data collected on a best effort basis from the browser network APIs (as Rohit pointed out). It means not all modern browsers support this, so it will often be missing. Furthermore, the browsers only support showing 2g, 3g, 4g up to 10Mbit/s from what I've seen. It's not much use at showing 'modern' downlink speeds (i.e. 200Mbit/s will still show as 4g, 10Mbit/s)

This is also not stored in the user session / actions table. Rather, it's stored in the waterfall analysis view of a user action and so it's only kept in short term retention for up to 10 days. It means it cannot be queried directly with USQL.

You will see this on the UA view:

Effective connection type: 4g
Network downlink: 10 Mbit/s
 
To be able to query it from USQL, it needs to be converted to user session / action properties first. This might be possible by referencing a JS variable.
Note, you can confirm which browsers support this as follows.
 
In DevTools, on the console, this works on Edge:
The_AM_0-1735601365745.png

But not on Mozilla Firefox:

The_AM_1-1735601400867.png

 

Regards,
Andrew M.

Featured Posts