-
Notifications
You must be signed in to change notification settings - Fork 164
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
Included pprof for profiling the application. #485
Conversation
Is this safe to run in production? Would it make more sense to manually register the handlers via a flag? |
Included pprof for profiling the application. Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
3fa564c
to
88fea80
Compare
Looks like we can still run it in Prod. https://stackoverflow.com/a/64057856/19407 I agree, I have included a flag that will enable pprof. Would this work? |
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 minus small nits
@@ -88,6 +94,21 @@ func init() { | |||
if GitVersion != "devel" { | |||
return | |||
} | |||
log.Logger.Debugf("pprof enabled %v", enablePprof) | |||
// Enable pprof | |||
if enablePprof { |
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.
do we need to check if the user has requested port 6060 for the main rekor endpoint and give a helpful error message?
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.
For now, I would pass on this because this flag has to be turned on and the default rekor endpoint port has to be set to 6060
. The odds of that happening are less IMO. Also, we have included the docs in the command line it could help someone debug.
Thoughts?
Co-authored-by: Bob Callaway <bobcallaway@users.noreply.github.com>
Co-authored-by: Bob Callaway <bobcallaway@users.noreply.github.com>
Included pprof for profiling the application.
Signed-off-by: naveen 172697+naveensrinivasan@users.noreply.github.com