kinbiko / bugsnag

Well-documented, maintainable, idiomatic, opinionated, and *unofficial* rewrite of the Bugsnag Go notifier
MIT License
3 stars 0 forks source link

[feat] Add sourcepath heuristic #55

Closed kinbiko closed 2 years ago

kinbiko commented 2 years ago

For in-project files hosted on GitHub, try to infer the "correct" path to the file so that the Bugsnag dashboard's links to source control per frame works assuming the following:

The file is hosted relative to the third '/' character of the full path of the file.

E.g.

github.com/kinbiko/bugsnag/examples/cmd/cli/main.go

Gets trimmed down to

examples/cmd/cli/main.go

Non-GitHub or non-in-project files are ignored and their full paths are still shown.

Closes #27

Checklist