-
Notifications
You must be signed in to change notification settings - Fork 621
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
chore(examples): update Go pprof migration example #3768
Conversation
4b3b2b9
to
d32764e
Compare
if err != nil { | ||
log.Fatalf("Error starting profiler: %v", err) | ||
} | ||
defer profiler.Stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We typically don't include this in our examples, but I believe it's something we should address. The last bit of information we usually omit can provide valuable insights. OTOH, we don't say anything about it in the README and in the source PR (which I can't update).
In this specific example this is required as the app usually exits before any profiles are sent. Alternatively, we could simply hang, but the mystery wouldn't be solved then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to update it as well in our SDK docs and README? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
if err != nil { | ||
log.Fatalf("Error starting profiler: %v", err) | ||
} | ||
defer profiler.Stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to update it as well in our SDK docs and README? 🤔
Done! |
I made slight modifications to the example code to fix the issue with premature exit. The README is well written; I only added a link to the docs and included some notes about the runtime functions we call.