-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add config option to attach pprof endpoints to http socket #28902
Add config option to attach pprof endpoints to http socket #28902
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
I'm splitting apart and improving on some aspects of #28798 so its easier to review |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
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
I'm wondering if we should even have this documented / supported in the context of Beats standalone as we only need this for Elastic Agent.
@@ -105,6 +105,7 @@ type beatConfig struct { | |||
|
|||
// beat internal components configurations | |||
HTTP *common.Config `config:"http"` | |||
HTTPPprof *common.Config `config:"http.pprof"` |
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.
At first I was thinking this would conflict with the HTTP config one line before but it seems we have the same pattern on line 110/111?
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.
yeah, i followed the same pattern
* Add config option to attach pprof endpoints to http socket * Fix linting issues * add security note * Add pprof security docs (cherry picked from commit 3d54291)
* Add config option to attach pprof endpoints to http socket * Fix linting issues * add security note * Add pprof security docs (cherry picked from commit 3d54291)
…o http socket (#28978) * Add config option to attach pprof endpoints to http socket (#28902) * Add config option to attach pprof endpoints to http socket * Fix linting issues * add security note * Add pprof security docs (cherry picked from commit 3d54291) * Fix CHANGELOG Co-authored-by: Michel Laterman <[email protected]> Co-authored-by: michel-laterman <[email protected]>
…28979) * Add config option to attach pprof endpoints to http socket * Fix linting issues * add security note * Add pprof security docs (cherry picked from commit 3d54291) Co-authored-by: Michel Laterman <[email protected]>
What does this PR do?
Add a config option to attach
/debug/pprof/
endpoints to the stats handler enabled viahttp.enabled
.Why is it important?
Currently pprof endpoints are only enabled when the
-httpprof
flag is used; these endpoints are bound to a different socket then the stats endpoint. We would like to serve these endpoints on the same socket in order to unify calls from external processes.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Enable http and pprof when running a beat via
-E http.enabled=true -E http.pprof.enabled=true
.Check the
/debug/pprof/
endpoint via curlRelated issues