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

chore(examples): update Go pprof migration example #3768

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

kolesnikovae
Copy link
Collaborator

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.

@kolesnikovae kolesnikovae force-pushed the chore/update-go-pprof-migration-example branch from 4b3b2b9 to d32764e Compare December 12, 2024 08:09
Comment on lines +78 to +81
if err != nil {
log.Fatalf("Error starting profiler: %v", err)
}
defer profiler.Stop()
Copy link
Collaborator Author

@kolesnikovae kolesnikovae Dec 12, 2024

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!

Copy link
Contributor

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? 🤔

@kolesnikovae kolesnikovae marked this pull request as ready for review December 12, 2024 08:26
@kolesnikovae kolesnikovae requested a review from a team as a code owner December 12, 2024 08:26
Copy link
Contributor

@marcsanmi marcsanmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Comment on lines +78 to +81
if err != nil {
log.Fatalf("Error starting profiler: %v", err)
}
defer profiler.Stop()
Copy link
Contributor

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? 🤔

@kolesnikovae kolesnikovae requested a review from a team as a code owner December 12, 2024 09:02
@kolesnikovae
Copy link
Collaborator Author

Would it make sense to update it as well in our SDK docs and README? 🤔

Done!

@kolesnikovae kolesnikovae merged commit 8264c00 into main Dec 12, 2024
18 checks passed
@kolesnikovae kolesnikovae deleted the chore/update-go-pprof-migration-example branch December 12, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants