-
Notifications
You must be signed in to change notification settings - Fork 109
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(zetaclient): enable pprof http server #3182
base: develop
Are you sure you want to change the base?
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe changes introduced in the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant PprofServer as Pprof Server
participant TelemetryServer as Telemetry Server
Client->>PprofServer: Start on port 6061
PprofServer-->>Client: Ready for profiling
Client->>TelemetryServer: Initialize telemetry
TelemetryServer-->>Client: Telemetry initialized
Client->>PprofServer: Monitor performance
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
@@ -253,6 +256,14 @@ func Start(_ *cobra.Command, _ []string) error { | |||
time.Sleep(30 * time.Second) | |||
} | |||
}() | |||
// pprof http server | |||
// zetacored/cometbft is already listening for pprof on 6060 (by default) | |||
go func() { |
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.
Consider using bg.Work
and bg.WithLogger()
, and startLogger
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.
I'm not sure that want to change the style of this whole file in this PR.
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.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
cmd/zetaclientd/start.go
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
cmd/zetaclientd/start.go (1)
Pattern **/*.go
: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
🪛 GitHub Check: lint
cmd/zetaclientd/start.go
[failure] 27-27:
G108: Profiling endpoint is automatically exposed on /debug/pprof (gosec)
[failure] 262-262:
G114: Use of net/http serve function that has no support for setting timeouts (gosec)
256dc61
to
a493936
Compare
!!!WARNING!!! Be very careful about using Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203 Pay extra attention to the way |
Enable the https://pkg.go.dev/net/http/pprof on zetaclient for runtime profiling. zetacored/cometbft is already listing in localhost:6060.
Summary by CodeRabbit