Feature/monitoring health search improvements - #744
Merged
MaryammAli merged 4 commits intoAug 29, 2026
Merged
Conversation
… outcome metrics Add Prometheus histograms for HTTP, database, Redis, AI, grading, payment, and notification latency. Add per-service error counters, queue depth gauges, and domain outcome counters so operators get actionable service-level metrics beyond the existing local counters. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
…s, and degraded state tests Readiness probes now wrap dependency checks (database, Redis) with configurable timeouts so stuck probes cannot block the endpoint. Error reasons are sanitized to strip connection strings, IPs, and ports. Added comprehensive tests covering healthy, degraded, unavailable, stalled-worker, and timeout scenarios. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
…pattern SearchService now delegates user and post queries to a SearchRepository abstraction backed by InMemorySearchRepository. The repository reads from UserProfileService and SocialService, applying authorization/visibility rules (deleted users excluded, only approved posts shown) and preserving response pagination. Fix pre-existing TS return types in course controller. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
… relevance weights Enhance SearchIndexerService with rankCourses() that applies field-weighted scoring (title > tags > description > categories) with lexicographic tie- breaking by course.id for stable, reproducible result ordering. Extract scoring constants into COURSE_SEARCH_WEIGHTS, document refresh behavior (write-through + bulk reindex), and add comprehensive tests for scoring, deterministic ordering, and reindex semantics. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@bilkee 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements four interconnected improvements to the monitoring, health, and search subsystems of BackendAcademy.
All four tasks are done and pushed to the feature/monitoring-health-search-improvements branch with 4 clean commits. Here's what was delivered:
Commit 1 — feat(monitoring): 7 Prometheus histograms (HTTP, DB, Redis, AI, grading, payment, notification latency), per-service error counters, queue depth gauges, domain outcome counters, and 18 passing tests.
Closes #681
Commit 2 — feat(health): Readiness probes now timeout independently, sanitize error reasons (no IPs/connection strings leaked), and 11 tests cover healthy, degraded, unavailable, stalled-worker, and timeout states.
Closes #682
Commit 3 — feat(search): Removed hardcoded user/post fixtures from SearchService. Introduced SearchRepository interface + InMemorySearchRepository backed by UserProfileService and SocialService, applying visibility rules (deleted users filtered, only approved posts).
Closes #683
Commit 4 — feat(search): Extracted COURSE_SEARCH_WEIGHTS, added rankCourses() with deterministic course.id tie-breaking, documented refresh behavior, and 13 tests for scoring/reordering/reindex.
Closes #684