Skip to content

fix: add pagination metadata (BE-24) and structured JSON logging (BE-23) - #919

Open
mercy60 wants to merge 4 commits into
OpenKnight-Foundation:mainfrom
mercy60:fix/be-23-24-pagination-logging
Open

fix: add pagination metadata (BE-24) and structured JSON logging (BE-23)#919
mercy60 wants to merge 4 commits into
OpenKnight-Foundation:mainfrom
mercy60:fix/be-23-24-pagination-logging

Conversation

@mercy60

@mercy60 mercy60 commented Jul 29, 2026

Copy link
Copy Markdown

Closes #871
Closes #872

- BE-24 (OpenKnight-Foundation#872): Add total_count to list_games endpoint with offset pagination
  * Extracted shared filter condition builder to eliminate duplication
  * Added offset parameter for page-based navigation alongside cursor
  * Return total_count, next_cursor, and limit in response metadata

- BE-23 (OpenKnight-Foundation#871): Replace env_logger with tracing for JSON structured logging
  * Configure tracing_subscriber with pretty output (debug) and JSON (release)
  * Add TracingLogger middleware for automatic HTTP request/response logging
  * Replace all eprintln!/println! calls with tracing info!/warn!/error! macros

Closes OpenKnight-Foundation#871
Closes OpenKnight-Foundation#872
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@mercy60 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

mercy60 added 3 commits July 30, 2026 21:54
…ng (BE-23)

- Replace log/env_logger with tracing/tracing-subscriber across all crates

- Socket server: env_logger → tracing_subscriber with pretty/json mode per build profile

- Service, matchmaking, API modules: all log:: macros → tracing:: macros

- Remove log dep from service and matchmaking Cargo.toml; add tracing

- Socket Cargo.toml: remove log+env_logger, add tracing+tracing-subscriber

- BE-24: pagination metadata (total_count, next_cursor) already wired in list_games

- Zero remaining log:: references in any Rust source file
- Add missing imports: JwtService, JwtAuthMiddleware, Migrator, MigratorTrait, MatchmakingService, create_redis_pool, test_redis_connection

- Fix variable shadowing: server → http_server in workers() call

- Comment out dead configure_nft_routes reference (not yet implemented)

- Remove unused DatabaseConnection import

- cargo check -p api and cargo build --workspace now pass
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.

BE-24: Add pagination to game history and tournament list endpoints BE-23: Setup centralized structured logging (JSON) for production observability

1 participant