-
Notifications
You must be signed in to change notification settings - Fork 242
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
Adding Pprof register method #1885
Conversation
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.
Seems reasonable to me
is it feasible/should we make this dynamically registerable? if we're trying to catch a memory leak, it might be nice to be able to turn the pprof handlers on, take the heap dump, and turn them back off without restarting the process. |
I believe we can still attach routes to the mux even after the server has started listening. Are you proposing:
I think while we decide on a more dynamic approach, it might be simpler to suggest to teams that use multi tenancy to run CNS with this turned on, since they own the infra and there should be less risk for abuse of these endpoints. |
@rbtr @ramiro-gamarra Why do we need to turn the pprof handlers on and off dynamically? There's no performance penalty until you actually collect a profile. |
but there is significant performance penalty when you do so best practice is to not leave pprof on in prod where someone could naively hit a dump endpoint and freeze the process for a minute |
* adding pprof register method that can be invoked in multiple paths * fixing lint issues
Reason for Change:
This PR enables pprof endpoints to be registered on the multi tenancy path.
Issue Fixed:
Requirements:
Notes: