-
Notifications
You must be signed in to change notification settings - Fork 4
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
[feature] Instrument the API server(s) with pprof #160
[feature] Instrument the API server(s) with pprof #160
Conversation
Provides facilities to hook up a net/http/pprof server on /debug/pprof. The majority of this commit will unify the server base across all binaries, which serve an API, in this case `goProbe` and `global-query`. This is primarily to deduplicate code for functionalit that is desired in both APIs. To this end, and analogous to the client.DefaultClient a server.DefaultServer is introduced to cover observability middlewares as well as setting up the gin.Engin
@fako1024 : I wanted to do this first before providing the profiles for #138 . There's only one caveat: the profiles are empty if I pull them with Have you encountered this before? Am I missing something obvious? |
I do recall something like that. Maybe it has something to do with the way
|
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.
Aside from some minor mimimi, LGTM!
Yup. That was it. Thanks! In that case, I'll wrap up this PR with the feedback and then deploy it on the sensors to collect profiles. This is getting better by the minute :) |
Provides facilities to hook up a net/http/pprof server on /debug/pprof.
The majority of this commit will unify the server base across all binaries, which serve an API, in this case
goProbe
andglobal-query
. This is primarily to deduplicate code for functionalit that is desired in both APIs.To this end, and analogous to the client.DefaultClient a server.DefaultServer is introduced to cover observability middlewares as well as setting up the gin.Engine
Closes #142