Performance monitor instance to track metrics
Express middleware function for automatic request tracking
// Basic usage with singleton monitor
import { performanceMiddleware, performanceMonitor } from '@/shared/utils/performance';
app.use(performanceMiddleware(performanceMonitor));
Express middleware factory for automatic HTTP request performance tracking.
Creates middleware that automatically measures response times and tracks error rates for all HTTP requests. Integrates seamlessly with Express applications and requires no manual instrumentation. The middleware is non-blocking and adds minimal overhead to request processing.