sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Add UPM packages contained in the project and their version to the Sentry Logs

Open avmaia opened this issue 4 years ago • 5 comments

Assembly definitions inside a package in the project are always logged as version 0.0.0.0, since its on the unity context it makes a lot more sense to log packages and their versions instead of these asmdefs.

Could possibly add an option to ignore assemblies generated from asmdefs inside packages since just always showing 0.0.0.0 adds some noise to the logging info.

avmaia avatar Sep 02 '21 16:09 avmaia

@avmaia thanks for raising this. Would you be willing to contribute with a PR? You could start with a draft PR without tests or anything to get something quick up and we can discuss from there next steps. Thanks!

bruno-garcia avatar Sep 02 '21 16:09 bruno-garcia

@avmaia thanks for raising this. Would you be willing to contribute with a PR? You could start with a draft PR without tests or anything to get something quick up and we can discuss from there next steps. Thanks!

I dont have much time to look into it on the near future, but my suggestions are to look into https://docs.unity3d.com/ScriptReference/PackageManager.Client.List.html (will list all packages information, Editor-only) and https://docs.unity3d.com/ScriptReference/PackageManager.Events.html (when packages get registered, Editor-only) For builds you can hook refreshing/storing the PackageInfos somewhere (maybe on the sentry asset) using the https://docs.unity3d.com/ScriptReference/Build.IPreprocessBuildWithReport.html

This would be my first try

avmaia avatar Sep 02 '21 17:09 avmaia

Related to #40

bruno-garcia avatar Nov 28 '21 21:11 bruno-garcia

For reference:

Example assembly list in Sentry

image

image image

Worth noting we've added an option Report Assemblies Mode) in the Editor integration window to change from the AssemblyVersion (those 4 digits) to AssemblyInformationalVersion. Some assemblies use it (for example, the Sentry/.NET ones):

image

But doesn't see to be very helpful for the Unity ones which don't use AssemblyInformationalVersion.

bruno-garcia avatar Mar 15 '22 15:03 bruno-garcia

Current state of the configuration, for reference:

image

vaind avatar Mar 15 '22 15:03 vaind