Skip to content

Add debug logging to shared server handlers#7843

Merged
lpcox merged 3 commits into
mainfrom
copilot/aw-go-logger-enhancement-fix
Jun 20, 2026
Merged

Add debug logging to shared server handlers#7843
lpcox merged 3 commits into
mainfrom
copilot/aw-go-logger-enhancement-fix

Conversation

Copilot AI commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

The Go Logger Enhancement workflow failed before producing a usable change set. This update applies the intended focused logging improvement manually in the shared server handler path the workflow was inspecting.

  • Shared handler observability

    • Add debug logs when the /reflect handler is created and when it serves a request.
    • Add debug logs around common endpoint registration so startup wiring is easier to trace.
  • Auth-wrapped close endpoint visibility

    • Log when /close is wrapped with API key auth.
    • Log the final set of shared endpoints once registration completes.
  • Scope

    • Keep the change limited to internal/server/handlers.go, reusing the existing server:handlers logger.
func HandleReflect(unifiedServer *UnifiedServer) http.HandlerFunc {
	logHandlers.Print("Creating reflect handler")
	return func(w http.ResponseWriter, r *http.Request) {
		logHandlers.Printf("Reflect endpoint request: remote=%s, method=%s, path=%s", r.RemoteAddr, r.Method, r.URL.Path)
		httputil.WriteReflectResponse(w, unifiedServer.DIFCComponents)
	}
}

GitHub Advanced Security started work on behalf of lpcox June 20, 2026 16:45 View session
GitHub Advanced Security finished work on behalf of lpcox June 20, 2026 16:46
Copilot AI changed the title [WIP] Fix Go Logger Enhancement workflow failure Add debug logging to shared server handlers Jun 20, 2026
Copilot AI requested a review from lpcox June 20, 2026 16:51
Copilot finished work on behalf of lpcox June 20, 2026 16:51
GitHub Advanced Security started work on behalf of lpcox June 20, 2026 16:51 View session
GitHub Advanced Security finished work on behalf of lpcox June 20, 2026 16:53
@lpcox lpcox marked this pull request as ready for review June 20, 2026 16:58
Copilot AI review requested due to automatic review settings June 20, 2026 16:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves observability in the shared HTTP endpoint wiring in internal/server/handlers.go by adding debug logs using the existing server:handlers debug logger, making it easier to trace handler creation and endpoint registration during startup and to see when /reflect is exercised.

Changes:

  • Add debug logging when the /reflect handler is created and when it serves a request.
  • Add debug logging at the start/end of shared endpoint registration to aid startup tracing.
  • Add debug logging when /close is wrapped with API key auth.
Show a summary per file
File Description
internal/server/handlers.go Adds debug logs for /reflect handler creation/requests and for common endpoint registration (including auth-wrapped /close).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread internal/server/handlers.go Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
GitHub Advanced Security started work on behalf of lpcox June 20, 2026 17:00 View session
GitHub Advanced Security finished work on behalf of lpcox June 20, 2026 17:02
@lpcox lpcox merged commit 927c42d into main Jun 20, 2026
13 checks passed
@lpcox lpcox deleted the copilot/aw-go-logger-enhancement-fix branch June 20, 2026 17:26
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