Wrapping Unity exceptions as Java Throwable, translating stacktrace for better reporting

Hello! I have a question regarding Error tracking. I have the native Android SDK wrapped for Unity and I don’t seem to get good Stacktraces from it, I wrap the Unity exception as the cause of a Java Throwable.

java.lang.Throwable: NullReferenceException: Object reference not set to an instance of an object.
...
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.access$500(Unknown Source:0)
at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:126)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
Caused by: java.lang.Throwable: UNITY STACKTRACE...```


In this case, the Unity stacktrace get truncated by being too long and I can’t get enough info from it.

Do you know if it is possible to translate the Unity stacktrace to a Java stacktrace somehow and get better reporting?

Hello Miguel and thanks for reaching out! We’re working on our own Datadog Unity SDK to let you monitor mobile games as you would do with whatever other mobile app. We’re looking at a launch in private beta next month. I wish we had it already for you not to have to do the wrapping yourself, but would you want me to sign you in for the private beta?

Thanks Maël! That would be nice, but I am not sure if there is any issue to enter the beta in behalf of my company or we should take another way to sign in

Let’s move to the DM section to discuss the details :slightly_smiling_face: