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

feat(http): allow for disabling pprof #20827

Merged
merged 7 commits into from
Mar 4, 2021
Merged

Conversation

danxmoran
Copy link
Contributor

Closes #20764

The big chunks of new logic are the /all profile, ported from 1.x. I didn't port the pieces of that code that gathered InfluxQL statistics, since we have other endpoints & tooling for scraping that info.

As a side-effect of switching away from using the default Mux, the /debug/vars endpoint is no longer exposed. Those vars were mostly empty in 2.x since we turned off the internal diagnostics service. The /metrics endpoint is the intended replacement.

if opts.PprofEnabled {
// add profiling routes
router.GET("/debug/pprof/:thing", http.DefaultServeMux.ServeHTTP)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK this mux isn't actually connected to anything, so this is just cleanup/consolidation

@danxmoran danxmoran force-pushed the dm-pprof-toggle-20764 branch 2 times, most recently from 9e95391 to 00c710d Compare March 3, 2021 19:22
@davidby-influx davidby-influx self-requested a review March 3, 2021 22:01
Copy link
Contributor

@davidby-influx davidby-influx left a comment

Choose a reason for hiding this comment

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

LGTM

@danxmoran danxmoran merged commit 25738db into master Mar 4, 2021
@danxmoran danxmoran deleted the dm-pprof-toggle-20764 branch March 4, 2021 14:28
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.

i would like to have the ability to disable the pprof endpoint
2 participants