This project is not covered by Drupal’s security advisory policy.
The Real-time Performance Monitor module acts as an automated, lightweight, real-time diagnostic watchdog for your Drupal website. It monitors backend database queries, custom PHP execution layers, and frontend rendering metrics directly from actual user traffic, triggering instant alerts via Email or Slack when performance thresholds are breached.
Unlike complex application performance monitoring (APM) tools that require heavy daemon installations, this custom module uses Drupal’s internal architecture to catch bottlenecks on the fly without introducing production overhead.
Key Features
- Slow SQL Query Detector: Tracks every single query executed on a page view. If a specific query takes longer than your configured millisecond limit, it logs the full SQL statement alongside the exact page URL.
- Duplicate Query ($N+1$) Alerting: Identifies redundant database requests. If the identical query is run more than X times on a single page lifecycle, an alert is triggered containing a clean breakdown of execution counts and the offending SQL string.
- PHP Backtrace Watchdog ("Bad Function" Locator): Monitors total backend processing engine times. If a custom hook, unoptimized loop, or slow external API bottleneck slows down a request, the module triggers a snapshot backtrace up to 15 levels deep—identifying the exact custom file name, function, and line number causing the delay.
- Frontend Telemetry Monitor: Utilizes the browser's native
PerformanceNavigationTimingAPI to measure exact page rendering limits, DOM interactive times, and incoming file sizes for compiled CSS/JS assets. - Multi-Channel Alerts: Supports comma-delimited notification routing to multiple administrative email addresses and handles standard asynchronous JSON payloads straight into Slack incoming webhooks.
Configuration
Once enabled, administrators can manage global performance tolerances and notification endpoints directly through a centralized dashboard interface located at:
Administer > Configuration > Development > Real-time Performance Monitor Settings (/admin/config/development/real-time-performance-monitor)
You can fully customize:
- SQL Execution time thresholds (in milliseconds).
- Maximum allowable duplicate queries per request loop.
- Maximum PHP engine threshold time before firing an internal stack trace.
- Total browser page render timeouts.
- Notification preferences (Email and Slack channels).
Requirements
- Drupal 10 or 11.
- Core Database and Core Mail systems.
Project information
- Project categories: Developer tools
- Created by rajat4u on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.




