Migrate GitLab Shell to slog
Summary
Migrate GitLab Shell to use Go's standard slog package for structured logging.
Why GitLab Shell?
GitLab Shell handles SSH access for GitLab and is a critical component for Git operations over SSH. Standardizing its logging will improve observability and consistency.
Goals
- Replace current logging implementation with
slog - Maintain backward compatibility with existing log formats where possible
- Ensure no performance regressions
- Validate that
slogmeets GitLab Shell's requirements - Align with standardized logging patterns
Migration Checklist
-
Audit current logging implementation -
Design sloghandler configuration for GitLab Shell -
Implement slogintegration -
Update all log call sites -
Update tests to work with new logging setup -
Benchmark performance (before/after comparison) -
Update documentation -
Deploy to staging environment -
Monitor for issues -
Deploy to production -
Document lessons learned
Success Criteria
-
All logging uses slog -
No performance regressions observed -
Log format remains compatible with existing log consumers -
Tests pass -
Documentation updated
Related
- Parent Epic: gitlab-org/quality#266 - Migrate Core GitLab Systems to slog
- Epic: gitlab-org/quality#235 - Defining Logging Standards for Developers