getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.61k stars 4.13k forks source link

Device context not being properly returned for certain android models #50137

Open Fwang36 opened 1 year ago

Fwang36 commented 1 year ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Several customers have reported certain Android models are not properly returning device context. Here is the portion of the event JSON from a Samsung Galaxy S22 on Android 13 and Pixel 4 on Android 13

Screenshot 2023-05-31 at 1 18 31 PM

Example Event From My Sentry Org. (updated event with data scrubbing turned off)

Expected Result

Returns Proper Device Context

Actual Result

Returns generic device of "K"

Product Area

Other

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 1 year ago

Assigning to @getsentry/support for routing, due by (sfo). ⏲️

getsantry[bot] commented 1 year ago

Assigning to @getsentry/support for routing, due by (sfo). ⏲️

mydea commented 1 year ago

Hi @Fwang36 !

We do not capture this information in the SDK, this is extracted server-side in sentry.io from the user agent. So I would move this to the sentry repo as this is probably where this would have to be fixed, I guess.

It may also be related to data scrubbing - when looking at the user agent from the linked event (which is what the device info is based on), I see this:

image

You can see the K in there which is probably what this is based off.

I'll move this back to sentry for now, let me know if there is anything else needed from the SDK side here.

getsantry[bot] commented 1 year ago

Routing to @getsentry/product-owners-issues for triage, due by (sfo). ⏲️

malwilley commented 1 year ago

It looks like this is a result of Chrome's recent changes to user-agent on Android devices: https://developer.chrome.com/blog/user-agent-reduction-android-model-and-version/

This will not be a simple fix since we will need to collect device information through means other than the user-agent. Will bring this up internally to see if there is a plan for this.

mydea commented 1 year ago

Possibly related: https://github.com/getsentry/relay/issues/1183