-
Notifications
You must be signed in to change notification settings - Fork 14
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: New service exposing CPU, memory, etc profiling information #446
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #446 +/- ##
==========================================
- Coverage 88.17% 87.96% -0.22%
==========================================
Files 200 202 +2
Lines 8053 8077 +24
==========================================
+ Hits 7101 7105 +4
- Misses 780 800 +20
Partials 172 172
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
dadrus
changed the title
feat: New service exposing CPU & memory profiling information
wip: New service exposing CPU & memory profiling information
Jan 17, 2023
3 tasks
…otherwise the service wont be accessible
dadrus
changed the title
wip: New service exposing CPU & memory profiling information
feat: New service exposing CPU, memory, etc profiling information
Jan 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue(s)
closes #445
Checklist
Description
This PR implements a new service, which if enabled exposes profiling information on port
4458
(configurable) with following paths:/debug/pprof
- responds with an HTML page listing the available profiles (see below)/debug/pprof/cmdline
- responds with the running program's command line, with arguments separated by NUL bytes/debug/pprof/profile
- responds with the pprof-formatted cpu profile. Profiling lasts for duration specified in seconds parameter, or for 30 seconds if not specified/debug/pprof/symbol
- looks up the program counters listed in the request, responding with a table mapping program counters to function names/debug/pprof/trace
- responds with the execution trace in binary form. Tracing lasts for duration specified in seconds GET parameter, or for 1 second if not specified.The configuration of this service happens in the
profiling
config property and supports the following values:The helm chat has been updated as well to support the configuration of this new service in sense of the exposed port (same value as above) und the ip this service is listenimg to. Latter is set to
0.0.0.0
to enable the usage by corresponding agents without the need for additional configuration. If enabled, it also sets annotations for Phlare to let an available phlare installation scrape the corresponding information. If Phlare is not installed, the annotations do not have any effect. The helm chart does not create a k8s service for this port.