Issue
The 'device' tag is empty (shown as 'empty string'). I'm seeing the issues from my UI, with plenty of tags (like chrome version, windows version, etc) but 'Device' is empty.
Applies To
- All customers and self-hosted users
- Error Monitoring
- Context
Resolution
Due to the way that we extract device information through our browser-based SDKs, it is often not possible to show device data when using a Desktop browser. This is because we use the User Agent header, for example:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
From the above, we extract the information of the browser and OS being used, but not the device. The only exception would've been in the following:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
In which case we can infer it is a Mac device.
This behavior changes when using other SDKs that support mobile devices, like react native, capacitor or electron, and flutter, along with exclusively mobile SDKs like cocoa and android.
Unfortunately that means that if you really need to know the device being used, you would need to acquire this information through custom methods on your side, and attach it to your events as context.