Originally created by: ankit-kumar-khandelwal
Problem Statement
TracerNest's embedded dashboard needs deeper runtime observability to help developers identify performance bottlenecks before they impact application users.
Node.js applications can experience memory pressure, garbage collection overhead, and event-loop delays that directly affect request latency and application responsiveness.
Currently, developers need external monitoring tools or custom instrumentation to understand these runtime metrics.
A lightweight, real-time monitoring widget would make these insights accessible directly within the TracerNest embedded console.
Proposed Solution
Introduce a Real-Time V8 Memory & Event-Loop Monitoring widget in the embedded TracerNest dashboard.
- V8 Memory Monitoring:
- Track heapUsed and heapTotal.
- Display heap usage percentage.
- Monitor heap_size_limit.
- Optionally expose external memory and RSS.
-
Visualize memory trends using lightweight SVG charts.
-
Event-Loop Monitoring:
- Measure event-loop lag using Node.js performance monitoring APIs.
- Calculate p50, p95, and p99 event-loop lag percentiles.
- Display current and historical latency trends.
-
Identify significant event-loop latency spikes.
-
Dashboard Integration:
- Embed the widget in the existing TracerNest console.
- Provide continuously refreshed metrics.
- Use lightweight, dependency-free SVG visualizations.
- Support configurable sampling and refresh intervals.
-
Keep monitoring overhead minimal.
-
General Requirements:
- Avoid introducing unnecessary runtime dependencies.
- Do not create additional listening ports.
- Preserve compatibility with existing TracerNest integrations.
- Ensure monitoring can be disabled or configured when required.
Expected Behaviour
The embedded TracerNest dashboard should provide real-time visibility into Node.js runtime health.
Expected capabilities:
- Display live V8 heap memory usage and memory utilization percentage.
- Show heapUsed, heapTotal, heap_size_limit, and RSS metrics.
- Render lightweight SVG charts showing memory consumption over time.
- Display event-loop lag percentiles:
- p50: Median event-loop lag.
- p95: 95th percentile event-loop lag.
- p99: 99th percentile event-loop lag.
- Highlight latency spikes and abnormal memory growth.
- Refresh metrics automatically using a configurable sampling interval.
- Provide historical metric trends within the dashboard session.
- Operate through the existing TracerNest dashboard without opening another port.
- Maintain low CPU and memory overhead.
- Work alongside existing logging, HTTP monitoring, and server health monitoring features.