Skip to content

Add structured JSON logging for backend (#3905) - #3954

Open
singhanurag0317-bit wants to merge 1 commit into
riteshbonthalakoti:mainfrom
singhanurag0317-bit:feat/structured-json-logging
Open

Add structured JSON logging for backend (#3905)#3954
singhanurag0317-bit wants to merge 1 commit into
riteshbonthalakoti:mainfrom
singhanurag0317-bit:feat/structured-json-logging

Conversation

@singhanurag0317-bit

Copy link
Copy Markdown

Changes

  • Created \�ackend/logging_config.py\ with JSON log formatter, contextual logger, and request middleware
  • Replaced \print()\ debug statements in \�ackend/main.py\ with structured logger calls
  • Replaced \print()\ debug statements in \�ackend/services/gemini_service.py\ with structured logger calls
  • Logs include request_id, user_id, client_ip, user_agent context fields
  • JSON format enables machine-parseable log aggregation

Files Modified/Created

  • \�ackend/logging_config.py\ (new)
  • \�ackend/main.py\
  • \�ackend/services/gemini_service.py\

Closes #3905

Adds a structured JSON log formatter compatible with CloudWatch/Datadog
ingestion. Replaces print statements with proper logging calls across
backend services.

Closes riteshbonthalakoti#3905
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@singhanurag0317-bit, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 448b9785-3ad5-4b04-a098-42ba0f77d710

📥 Commits

Reviewing files that changed from the base of the PR and between da8faf2 and 7a91557.

📒 Files selected for processing (10)
  • MobileApp/src/screens/user/CreateTicketScreen.js
  • MobileApp/src/screens/user/KnowledgeBaseScreen.js
  • MobileApp/src/screens/user/NotificationsScreen.js
  • MobileApp/src/screens/user/ProfileScreen.js
  • MobileApp/src/screens/user/TicketDetailScreen.js
  • MobileApp/src/screens/user/TicketTrackingScreen.js
  • MobileApp/src/screens/user/TicketsListScreen.js
  • backend/logging_config.py
  • backend/main.py
  • backend/services/gemini_service.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

feat(backend): log application activities via structured JSON format

1 participant