Skip to content

Conversation

@fbac
Copy link
Collaborator

@fbac fbac commented Jun 27, 2025

Add pprof HTTP server to replication command with configurable debug options

  • Adds DebugOptions struct to pkg/config/options.go with Enable and Port fields for configuring the debug server
  • Creates new debug package in pkg/debug/pprof.go with Server struct that provides Start and Shutdown methods for managing pprof HTTP endpoints
  • Modifies cmd/replication/main.go to conditionally start the pprof server when debug options are enabled

📍Where to Start

Start with the main function in cmd/replication/main.go where the pprof server initialization logic is added.

Changes since #923 opened

  • Added deferred shutdown function for pprof debug server [f8ec6a1]

Macroscope summarized f8ec6a1.

@fbac fbac requested a review from a team as a code owner June 27, 2025 16:51
@graphite-app
Copy link

graphite-app bot commented Jun 27, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

}
}

func (s *Server) Shutdown(ctx context.Context) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see anything calling this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added it!

@fbac fbac requested a review from mkysel June 27, 2025 20:59
@fbac fbac merged commit 792b453 into main Jul 11, 2025
9 checks passed
@fbac fbac deleted the 06-27-pprof branch July 11, 2025 06: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.

3 participants