Closed veqryn closed 6 months ago
Hi @veqryn
Thank you for opening this pull request. Internal discussions are underway regarding the changes proposed in this PR. We will keep you informed with any additional information as soon as it becomes available.
Hi @veqryn
Thank you for your patience as we investigated this issue further.
We are currently working on an alternative to this PR - You can check it out here if you would like to try it out. The changes here are to fix the order of trimming on file paths and setting the SourceRoot
in the configuration to the top directory of the code.
If you do get the chance to try the PR, please let us know if it has solved your issue or whether you are seeing any further issues relating.
Hi @veqryn
I'm just reaching out to let you know we have a new release (v2.3.0) out for the BugSnag-Go notifier.
This release should address the issue you were seeing with trimming everything before "main.go" on main packages. If after updating you are still seeing issues, please let us know and we can investigate further.
Great to hear, thank you!
Goal
No matter how I configure
SourceRoot
andProjectPackages
, any stack trace with a main package with a file containing "main" will be trimmed of its prefix, valid or not. We should not do that, and let SourceRoot and ProjectPackages do that.For example, if I have multiple main files, it can be confusing knowing which one is responsible when bugsnag shows all of them as
main.go
.Another example, if I have a main file called
my_main_file.go
, it will show up in Bugsnag as justmain_file.go
, with themy_
stripped off, which is clearly wrong.I would expect that in bugsnag it would show up as something like
cmd/export-service/my_main_file.go
Design
Skip trimming everything in front of the word "main"
Changeset
See file diff
Testing
All automated tests pass. Manual testing works as well, with the desired result.