-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional app and device fields #881
Conversation
This stores the number of milliseconds that the application has been running, based on the time Bugsnag was started and the time the event happened This also removes the Expo specific implementation of this, so it also uses the version from core
This adds the 'manufacturer' and 'model' fields to Android and the total device memory to both iOS and Android
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. A couple of comments to consider. Probably best if someone else approves too but looks good to me against the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the inline comments, as we discussed, the app duration functionality should be shared between node and the browser. I think since expo's app plugin collects more info, it's fine for app.duration
to be populated there.
I think the new plugin should be called @bugsnag/plugin-app-duration
.
be47855
to
65bea8d
Compare
65bea8d
to
64fd89e
Compare
b22fe62
to
bc2fb4a
Compare
This PR adds a number of additional fields to the
app
anddevice
notify keys, specifically:orientation
— the orientation of the browser using theScreen.orientation
API. This is fairly widely supported, but not universally (e.g. Safari doesn't support this). There is also fallback which compares the browser width & height, to support more devicestotalMemory
— the total memory available on the device, fetched with theexpo-device
module, which is a new dependencyosName
— this usesos.platform
, so reports the kernel name. This is still a good indicator and is much simpler and less error prone than trying to detect the OSosVersion
— this usesos.release
, which is also kernel informationtotalMemory
— the total memory available to the node process (os.totalmem
)freeMemory
— the free memory available to the node process (os.freemem
)Two new plugins have been added:
duration
field toevent.app
, like the existingplugin-expo-app
duration
field toevent.app
, like the existingplugin-expo-app
These plugins are currently identical so it may make sense to merge them into a
plugin-duration
, which could then be used in Expo too. I'm not sure if we'd want to keep them separate though, so that there's room for them to diverge in future if we add more app fields to the browser or Node