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
slogmeets GitLab Pages' requirements - Improve observability for static site serving
Migration Checklist
-
Audit current logging implementation -
Design sloghandler configuration for GitLab Pages -
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