Display contexts with correct formatting
Events from the .NET SDK (like this) have some data being sent as bytes in integer format:
In other parts of the protocol we're able to display it as 'KB, MB, GB etc".
What needs to be done on the SDK to get the data shown properly?
That's happening here in the SDK:
https://github.com/getsentry/sentry-dotnet/blob/717aa7356a1f4bebf4b9379243c05f760b92d613/src/Sentry/Internal/MemoryInfo.cs#L8
https://github.com/getsentry/sentry-dotnet/blob/717aa7356a1f4bebf4b9379243c05f760b92d613/src/Sentry/Internal/MainSentryEventProcessor.cs#L165-L193
Routing to @getsentry/product-owners-issues for triage ⏲️
cc @rachrwang, a few years ago @matejminar added some formatting, IIRC we have something for other parts of the context part of the protocol like Device.Memory. So I'm hoping this could be an easy fix.
I find it impossible to parse the data the way it looks right now.
This is part of the challenges to debug OOM's on .NET already, tracked here:
- https://github.com/getsentry/sentry-dotnet/issues/3315
Visualizing the memory info in a more humable readable way will definitely improve things.
Fixed in https://github.com/getsentry/sentry/pull/80623, wrapped the values in formatMemory!
So nice to read! thank you @leeandher