-
-
Notifications
You must be signed in to change notification settings - Fork 329
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 how much space an app takes up on the user's device #1664
Comments
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
What also would be useful is the available disk space on the device. |
At least on Android that's already available. |
Documents and data size is interesting. We could use something similar to this, but the solution is to traverse all files inside the app folder. If the app has created hundreds of files, this can be expensive. The sample I read says something about 35ms for 100 files. To get available disk space we can use this snippet: let values = try url.resourceValues(forKeys: [.volumeAvailableCapacityForImportantUsageKey])
if let capacity = values.volumeAvailableCapacityForImportantUsage |
It doesn't seem like feasible to attach either of those on each event because the overhead to retrieve this value "fresh" is rather expensive (depending on the amount of data on the folders). We had a brainstorming session for this value to go out as measurements. Not for |
I am going to send this as |
Please be explicit about the Also, the UI should be able to render KB/MB/GB, etc, if the field is set to the right unit in the Sentry front end |
It's in bytes like all the other memory and storage sizes we send |
Yes, please use the same approach as for these values sentry-cocoa/Sources/Sentry/SentryCrashIntegration.m Lines 251 to 253 in ceaa579
They show up like this in Sentry: We need changes in Sentry to support that. Similar to these lines of code https://github.com/getsentry/sentry/blob/0dbd18fc57a5a360fdfca921f59fbee4d0f650c6/static/app/components/events/contexts/device/getDeviceKnownDataDetails.tsx#L120-L127
@priscilawebdev, can you maybe tell us how to add another known datatype in the file above? |
I'm not sure what you mean with this. What approach do you mean? I'm setting an integer of bytes to the field |
Yes, exactly. |
@ueman or @marandaneto, do you already send this for the dart SDK? If yes, which name did you choose for this property? |
No, the Dart SDK doesn't send it. |
nope, that would come directly from the iOS or Android SDK if possible. |
We discussed this in our meeting today, and we're closing this issue for now until we can track metrics over time. We can't measure the Documents & Data size in real time for every single transaction because it's too slow, so it doesn't make sense to send this data as part of a transaction - it'll be stale data. What would be interesting is to see the value change over time, for which metrics would be the way to go. This is something to pick up in the future. |
I agree with the decision but I'd rather keep the issue open, it's a fair request and people can upvote if it's essential, if we don't do it for reasons, it's an implementation detail. |
Problem Statement
In the iOS settings (General -> Storage) I can see how much space an app takes up. This is split into:
The use case is, that I can see if the app creates too much data or if I don't properly clean up data.
Relates to getsentry/sentry-java#1917
Solution Brainstorm
No response
The text was updated successfully, but these errors were encountered: