RUMM-2196: Add OS and device information to RUM events #945
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This change and OS information (name, version, major version), and device information (type, model, name, brand) to the RUM events. Essentially it is a continuation of the work started in DataDog/rum-events-format#62 with a goal to have a better control on the device/OS information compared to parsing User Agent header approach (which requires continuous maintenance from backend team and has difficulties in the device categorization).
WIth that change SDK will send the following:
OS Name - will always be
Android
.OS Version - full OS version, like
8.1.0
, will always be the value of Build.VERSION.RELEASE property.OS Major Version - only the
major
part of the semver format, like8
for the OS version value above (or value of the version itself if non-semver format is used).Device model - technical name of the device, like
SG-M8888
, will always be the value of Build.MODEL property.Device brand - the value of Build.BRAND property capitalized.
Device name - normally a full name, which is a concatenation of model and brand (done like that to be backward compatible as most as possible with existing values of
device.name
facet).Device type - can be
mobile
,tablet
,tv
orother
. The borderline betweenmobile
andtablet
is quite blurry, especially considering that some tables come with SIM-cards (hence telephony), so the major property to distinguish the two is thesmallest screen width
. Most of Stackoverflow answers suggest to use value of600
(large), but 800 (xlarge) is used instead, because in the last years screen size of the phones got bigger on average (but this means that also Nexus 7 will fall underOther
category, because it haslarge
display, notxlarge
and no cellular connectivity).TV
category detection relies on the some features, but it can be that both TV sticks and real TVs fall into this category (not only real TVs).It may be that it will be some difference in the
device.type
values ordevice.name
compared with existing ones, but I expect the difference to be quite small. Anyway, we will also see what are the values sent with a next release and tune the classification logic.P.S. PR looks big, but in reality the main content is just in the https://github.com/DataDog/dd-sdk-android/pull/945/files#diff-1f56ceca14027b5fe4de05bfa4b764f1d02c15791fc0653eec8097056e70d27d.
Review checklist (to be filled by reviewers)