Open prabhuamol opened 2 months ago
related to this https://github.com/bugsnag/bugsnag-cocoa/issues/1687
Hi @prabhuamol
The fields in the BugsnagApp
/BugsnagAppWithState
classes deliberately mirror the API fields of the BugSnag Reporting endpoint. These memory fields are not first class fields but simply platform-specific metadata that the SDK reports, they are not in the class but can be manipulated in callbacks using the addMetadata
or clearMetadata
methods on the event with a key such as "app.memoryLimit".
However, it should be noted that the on send callback you are proposing to use is not run at the time of a the crash, but when the report is sent on a subsequent launch so it can be minutes, hours, days or months after the crash occurred. So adding memory stats at this stage is of questionable use in the event. I see you have linked to the query about the lack of these stats in OOMs and that is due to the fact that the app is terminated without the ability to run any sort of diagnostic code.
Sounds good. I was hoping to get access to app memory at the time of crash so we could check it before we send the report. but I see what you are saying
Also now i wonder is the device memory/app memory that you see in bugnsag is reported at the time of the OOM event or is that the memory when the event is sent? Talking about the data shown here. I am guessing thats at the time of the crash
And how does that correlate to event.device.freeMemory
at the time of sending the event
Hi @prabhuamol 👋🏻, BugSnag is collecting the data at the moment of the crash. Regarding the fields you’ve highlighted:
freeMemory
is showing ow much additional memory the app may allocate before reaching its memory limit, as reported by, and memoryUsage
is showing app’s memory footprint.
You can check our docs to find information about data automatically captured by BugSnag.
Description
Add freeMemory, memoryLimit and memoryUsage that is found on Bugsnag to BugsnagAppWithState. This will help analyze error events before sending them to bugsnag via
addOnSendErrorBlock
Describe the solution you'd like More memory related data in BugsnagAppWithState
Describe alternatives you've considered Tried to get app memory information via BugsnagEvent using other means