TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Fgtrace – The Full Go Tracer

117 pointsby felixgeover 2 years ago

6 comments

felixgeover 2 years ago
I&#x27;m the author of fgtrace, happy to answer any questions :).<p>I&#x27;ve also posted a few more comments in this twitter thread: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;felixge&#x2F;status&#x2F;1571850160358965249" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;felixge&#x2F;status&#x2F;1571850160358965249</a>
评论 #32904097 未加载
评论 #32898427 未加载
kjeetgillover 2 years ago
&gt; fgtrace may cause noticeable stop-the-world pauses in your applications.<p>Huh, I wonder if this is a temporary limitation or an issue with the approach. In my experience if you&#x27;re doing profiling you probably better off getting something lighter weight that you can get more honest numbers from.<p>Edit: reading closer, it looks like the go team had similar concerns. I wonder if this can capture how long a goroutine was unmounted for.
评论 #32898591 未加载
chrsigover 2 years ago
The proposal[0] mentioned in the README has some good insight from rsc.<p>He notes the performance &amp; scalability issues already noted here by other commenters.<p>&gt; Probably the right thing to do is figure out more of a trace like the current trace profiles but perhaps less low level.<p>This is the key take away for me.<p>I think there&#x27;s room for tracing support somewhere in-between runtime&#x2F;trace and full blown distributed traces (e.g., OpenTelemetry[1]) - so I&#x27;m hopeful this effort may evolve into a good solution in that space.<p>From a usability point of view, my biggest gripe right now with the go tracer is that it&#x27;s viewer is...painful. It uses the tracer that&#x27;s built into chrome, which chrome itself is moving away from.<p>I&#x27;d hacked around a bit recently to try and get the existing go traces into perfetto[2], with some success. As I recall, I couldn&#x27;t get user traces functioning.<p>The `go tool trace` server has an api to output compatible json, but it&#x27;s limited in what it outputs. Unfortunately, the trace file itself is in some custom binary format. All the tools for manipulating it are in `internal&#x2F;` folders, making them unavailable for import, so creating new tools for working with the traces is quite burdensome.<p>I&#x27;d debated copying the code out into a new project, and starting to hack on it, but at that point, I&#x27;d reached the end of my willingness to invest time. Perhaps I should open an issue or mesage the mailing list to see what the maintainers think the future of runtime tracing looks like.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;issues&#x2F;41324#issuecomment-703796820" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;go&#x2F;issues&#x2F;41324#issuecomment-70379...</a><p>[1] <a href="https:&#x2F;&#x2F;opentelemetry.io" rel="nofollow">https:&#x2F;&#x2F;opentelemetry.io</a><p>[2] <a href="https:&#x2F;&#x2F;ui.perfetto.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ui.perfetto.dev&#x2F;</a>
评论 #32899857 未加载
hknmttover 2 years ago
Looks interesting, added a star to keep track.
jaffeeover 2 years ago
this thing is awesome, have used it many times to quickly track down tricky performance issues.
评论 #32898447 未加载
nathiasover 2 years ago
never go full tracer
评论 #32898232 未加载