Skip to content

Centralized trace logging#82

Merged
Ricky-RL merged 10 commits intomainfrom
centralized-trace-logging
Apr 17, 2026
Merged

Centralized trace logging#82
Ricky-RL merged 10 commits intomainfrom
centralized-trace-logging

Conversation

@Ricky-RL
Copy link
Copy Markdown
Collaborator

Add logging. It looks liek this:

{"timestamp": "2026-04-17 02:51:13,138", "level": "INFO", "logger": "api.main", "message": "Starting Evalhub application", "trace_id": "", "module": "main", "func": "lifespan"}
{"timestamp": "2026-04-17 02:51:23,164", "level": "INFO", "logger": "api.auth.service", "message": "User authenticated: admin@evalhub.com", "trace_id": "3d288c32-a65e-4d3c-bdfa-8d8c33d5f953", "module": "service", "func": "login"}
WARNING:  StatReload detected changes in 'api/__main__.py'. Reloading...
{"timestamp": "2026-04-17 02:52:05,849", "level": "INFO", "logger": "api.main", "message": "Shutting down Evalhub application", "trace_id": "", "module": "main", "func": "lifespan"}
WARNING:  StatReload detected changes in 'api/__main__.py'. Reloading...
{"timestamp": "2026-04-17 02:52:14,393", "level": "INFO", "logger": "api.main", "message": "Starting Evalhub application", "trace_id": "", "module": "main", "func": "lifespan"}
{"timestamp": "2026-04-17 02:52:22,116", "level": "INFO", "logger": "api.main", "message": "Starting Evalhub application", "trace_id": "", "module": "main", "func": "lifespan"}
WARNING:  StatReload detected changes in 'api/core/redis_client.py'. Reloading...
{"timestamp": "2026-04-17 02:53:07,054", "level": "INFO", "logger": "api.main", "message": "Shutting down Evalhub application", "trace_id": "", "module": "main", "func": "lifespan"}```

Ricky-RL added 10 commits April 17, 2026 02:25
Covers trace ID middleware, structured JSON logging, and Celery
trace propagation — backend only, zero new dependencies.
Five tasks: trace context module, JSON formatter, middleware registration,
Celery propagation, and smoke test. TDD approach with full test code.
- Add token-based reset in TraceIDMiddleware to prevent context leaks
  if middleware is ever refactored away from BaseHTTPMiddleware
- Add teardown_method to TestSetupLogging to prevent handler pollution
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evalhub Ready Ready Preview, Comment Apr 17, 2026 9:54am

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 17, 2026

Not up to standards ⛔

🔴 Issues 18 high

Alerts:
⚠ 18 issues (≤ 0 issues of at least minor severity)

Results:
18 new issues

Category Results
Security 18 high

View in Codacy

🟢 Metrics 31 complexity · 0 duplication

Metric Results
Complexity 31
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@Ricky-RL Ricky-RL merged commit cd25be9 into main Apr 17, 2026
2 of 5 checks passed
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