Skip to content

Cleanup verbose logging in kubelet monitor#1199

Open
courageJ wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
courageJ:cleanup-verbose-logging
Open

Cleanup verbose logging in kubelet monitor#1199
courageJ wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
courageJ:cleanup-verbose-logging

Conversation

@courageJ
Copy link
Copy Markdown
Contributor

PR Description: Cleanup Verbose and Sensitive Logging in Kubelet Monitor

Summary

This PR refactors the error logging in the kubelet package to improve log hygiene and readability.

Previously, translation failures would result in printing large, complex internal data structures (such as the full stats.Summary object). This led to significant log bloat and made it difficult for operators to parse actual error messages.

Changes

  • kubelet/source.go: Removed verbose data payloads from error messages.
  • kubelet/translate.go: Cleaned up internal fmt.Errorf calls to ensure log messages remain concise and actionable.

Verification Results

  • Ran go test ./kubelet/... in the monitor directory.
  • All tests passed: ok github.com/GoogleCloudPlatform/k8s-stackdriver/kubelet-to-gcm/monitor/kubelet 0.029s

@courageJ courageJ force-pushed the cleanup-verbose-logging branch from b4eb41b to d988a02 Compare May 20, 2026 18:22
@courageJ courageJ requested a review from erain May 20, 2026 20:20
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.

1 participant