getsentry / team-mobile

Meta issues for the Mobile team
4 stars 1 forks source link

Extend Device Context with CPU info #77

Closed markushi closed 1 year ago

markushi commented 1 year ago

Our device context docs describe a few new CPU related fields which are not provided by the mobile SDKs yet.

### Platforms
- [X] https://github.com/getsentry/sentry-java/issues/2561
- [ ] https://github.com/getsentry/sentry-cocoa/issues/2740
- [ ] https://github.com/getsentry/sentry-react-native/issues/2884
- [X] [Flutter](https://github.com/getsentry/sentry-dart/issues/1309) (looks like protocol was updated here https://github.com/getsentry/sentry-dart/pull/838 but data isn't provided) -> follow up https://github.com/getsentry/sentry-dart/issues/1401

GH discussion on device classification https://github.com/getsentry/sentry/discussions/44422

edwardgou-sentry commented 1 year ago

Hey @markushi! I'm working on utilizing these fields in parallel, can I assume that processor_count will just be a simple number value and processor_frequency will be a number value representing frequency in mhz (ie 2500 for 2500mhz/2.5ghz)? This is also how this data is stored in profiles from what I can tell.

kahest commented 1 year ago

Hey @edwardgou-sentry! We want to adhere to the way of reporting these fields that exists from Profiling, so it's safe to assume this!

edwardgou-sentry commented 1 year ago

Awesome! Thanks @kahest ! 🙏

brustolin commented 1 year ago

It seems that for iOS there is no reliable way to retrieve CPU description or frequency. The workarounds suggest to hard code the device model with such information, I think we should do this in the server side to avoid the need to update the SDK to include more information on every new device release.

We just need to compile an updated list like the one in this

markushi commented 1 year ago

@edwardgou-sentry before merging the Android PR, could you help me clarify the following:

  1. do you know if the processor_count should be the number of logical cores or physical cores?
  2. the processor_frequency is defined as a single number in the protocol, but can be different for every core - I assume we want to send over the highest value right?
markushi commented 1 year ago

@edwardgou-sentry any chance you could take a look into my questions above?

edwardgou-sentry commented 1 year ago

Hey @markushi , sorry I missed this!

  1. This should be number of physical cores
  2. Yes, we're looking for the highest performance core here

Thanks!