Feat/gpu resource monitoring health dashboard#475
Open
sublime247 wants to merge 5 commits intoPulsefy:mainfrom
Open
Feat/gpu resource monitoring health dashboard#475sublime247 wants to merge 5 commits intoPulsefy:mainfrom
sublime247 wants to merge 5 commits intoPulsefy:mainfrom
Conversation
…ile app." This reverts commit ffc9d34.
- Add AiMetricsService with Prometheus metrics for AI inference (request count, latency histogram/summary, error counter) - Track model load times and concurrent inference count - Monitor system RAM and GPU VRAM via periodic sampling (nvidia-smi) - Implement graceful request throttling via AiThrottleGuard (concurrency limit, RAM threshold, VRAM threshold → 503 + Retry-After) - Add AiMetricsInterceptor for automatic per-route inference latency logging - Expose GET /ai/metrics (JSON health report with status/throttling/resources) - Expose GET /ai/metrics/prometheus (Prometheus scraping endpoint) - Expose GET /ai/metrics/health (liveness check, 200 or 503) - Add AI-specific Prometheus alert rules (latency, error rate, RAM/VRAM, throttling, concurrency, model load time) - Add AI recording rules for pre-computed metric aggregations - Add Prometheus scrape job for /ai/metrics/prometheus - Register AiMetricsModule globally in AppModule - Add 29 unit tests covering service, controller, and guard - Add AI_* env vars to .env.example
- Remove unnecessary async from onModuleInit (require-await) - Use static import for child_process execSync (no-require-imports, no-unsafe-assignment) - Type getRequest<Request>() and getResponse<Response>() (no-unsafe-member-access) - Cast x-ai-model header to string (no-unsafe-argument) - Update onModuleInit test to match sync signature
Cedarich
requested changes
Mar 26, 2026
Contributor
Cedarich
left a comment
There was a problem hiding this comment.
Hello @sublime247 Can you check this issue and confirm you're working on the right directory
Contributor
Author
|
Oohhhhh |
Contributor
|
Fix conflict |
Contributor
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.
Closes #160