feat(observability): configurable logging, request ids and error logs

- internal/logging: LOG_LEVEL/LOG_FORMAT parsing and slog handler
- request_id middleware (X-Request-ID or generated, echoed) + debug access log
- httpx registers errors; middleware logs internal causes with request_id
- health excluded, objects/sse debug-only, no query/body/secrets in logs
- new observability capability spec; README/.env.example docs
This commit is contained in:
iu
2026-10-11 13:40:11 +03:00
parent a5d0cee0eb
commit 6361e48b20
18 changed files with 998 additions and 5 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func (s *Server) StartWorker(ctx context.Context) {
func (s *Server) Router() *gin.Engine {
r := gin.New()
r.Use(gin.Recovery())
r.Use(gin.Recovery(), requestIDMiddleware(), accessLogMiddleware())
authHandler := auth.NewHandler(s.auth)
albumsHandler := albums.NewHandler(s.albums)