I'm using Sentry to collect exceptions from a Unity Engine app. In some cases, it's possible to cause an exception every frame, i.e. 60+ times per second. Sentry logs all of these events individually. I want to limit the number of times the "same" exception is logged.
What would be a reliable way to determine if two instances of System.Exception are produced at the same location in the program? Obviously, I could use the file name and line number, but this information is only available in Debug builds. Is there any alternative for release builds?
I'm looking at StackTrace and StackFrame, but I can't find a unique identifier of the exception location, that is available in Release.