-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[wip] sql: add crdb_internal.node_stacks #59301
Conversation
Once we have cockroachdb#55733 and cockroachdb#59200, it will be very useful to be able to join together, on each node, the long-running trace *stacks*. To this end, a `crdb_internal.node_stacks` table is added. Release note: None
please ping me when there is more to look at here |
Will do. Right now this PR just keeps me from forgetting to come back to this. |
I'm intrigued by the possibility of writing a SQL query that joins long-running trace spans with the stack of the goroutine id assigned to the span. This isn't at all possible with the profile route taken here (the goroutine profile doesn't contain goroutine ids, it just counts unique stacks basically) but it would be with https://github.com/maruel/panicparse, though that requires calling |
FWIW that's precisely what @felixge and I were talking about today. Probably worth brainstorming this together. |
Cool stuff, love the idea of exposing perf data in SQL 😍. Where does the data in
We're also interested in the data provided by That being said, we decided to go down this route a little bit, but concluded the https://github.com/DataDog/dd-trace-go/tree/v1/profiler/internal/stackparse It's not seen much battle in the real world yet, but I've thrown fuzzing, property based testing, etc. at it. In the end it's about 100x faster than panicparse and 10x less code. If you're interested, I think we can expose this as an importable module. See this comment for more info and design goals. |
This PR really isn't much to look at, I ended up not even trying to get the stacks but started poking at the goroutine profile (which is what the "stacks" profile is). But as a goroutine profile, of course it doesn't have info on individual goroutines, it's mostly a map Have you by any chance explored an approach such as https://play.golang.org/p/6gi26PF3iTT to pull the internals? |
No, but this is awesome! I've seen the Thank you so much for sharing this, I'll definitely play around with this approach very soon. |
Once we have #55733 and #59200, it will be very useful to be able to
join together, on each node, the long-running trace stacks.
To this end, a
crdb_internal.node_stacks
table is added.Release note: None