Migrate GitLab Pages to slog

Summary

Migrate GitLab Pages to use Go's standard slog package for structured logging.

Why GitLab Pages?

GitLab Pages serves static websites and is a user-facing service that would benefit from standardized, structured logging for better observability and debugging.

Goals

  • Replace current logging implementation with slog
  • Maintain backward compatibility with existing log formats where possible
  • Ensure no performance regressions
  • Validate that slog meets GitLab Pages' requirements
  • Improve observability for static site serving

Migration Checklist

  • Audit current logging implementation
  • Design slog handler configuration for GitLab Pages
  • Implement slog integration
  • 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