Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacktrace for functions from "go.*" will have incorrect package name #180

Closed
Pr0Ger opened this issue Mar 9, 2020 · 2 comments · Fixed by #730
Closed

Stacktrace for functions from "go.*" will have incorrect package name #180

Pr0Ger opened this issue Mar 9, 2020 · 2 comments · Fixed by #730
Assignees

Comments

@Pr0Ger
Copy link
Contributor

Pr0Ger commented Mar 9, 2020

sentry-go/stacktrace.go

Lines 257 to 262 in 4dddaaa

func packageName(name string) string {
// A prefix of "type." and "go." is a compiler-generated symbol that doesn't belong to any package.
// See variable reservedimports in cmd/compile/internal/gc/subr.go
if strings.HasPrefix(name, "go.") || strings.HasPrefix(name, "type.") {
return ""
}

This code as exptected will ignore parsing for functions which name starts from "go" however this is sometimes a valid package name. For example zap library: go.uber.org/zap/zapcore.(*CheckedEntry).Write will not properly extract go.uber.org/zap/zapcore as a package name.

Since this code is copied from debug/gosym I filled same issue for original code golang/go#37762

@rhcarvalho
Copy link
Contributor

@Pr0Ger thanks for reporting here and upstream. I'll monitor what will happen upstream before we make changes here.

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants