Blog

  • Node js Application metrics ('appmetrics-dash') provide you to display data and visualize the performance of your Node.js application

    • It is a web based dashboard of your running Node Application.
    • Path defaults to /appmetrics-dash 

     

    Installation

     

    It can be accessed by:  

     
    const dash = require('appmetrics-dash');
    
     
    To add the dashboard to all HTTP server created by your application:
     
     
    const dash = require('appmetrics-dash');
    dash.attach();
    
     

    If you are not creating an HTTP server then use:

     

     
    const dash = require('appmetrics-dash');
    dash.monitor();
    

     

    The above code will create a new HTTP server running on port 3001. Accesed by http://localhost:3001/appmetrics-dash.

    If you want to add the dashboard to one specific HTTP server then use:

    const dash = require('appmetrics-dash');
    dash.monitor({server: myHttpServer});
    

     

    Understanding the data metrics:

    1. CPU Profiling
    2. HTTP Incoming Requests
    3. HTTP Throughput
    4. Average Reponse Times (top 5)
    5. CPU
    6. Memory
    7. Heap
    8. Event Loop Times
    9. Environment
    10. Other Requests
    11. HTTP Outbound Requests

    CPU and Memory graphs show system and process usage over time. HTTP Incoming Requests, HTTP Outgoing Requests and Other Requests show event duration against time. HTTP Throughput shows requests per second . Heap shows the maximum heap size and used heap size over time.

    ‘Other Requests’ chart shows database request duration for supported databases (MongoDB, MySQL, Postgres, LevelDB and Redis), as well as Socket.IO and Riak events, which could help you further identify where time is being spent in your application.

    By clicking enable button we can generate a Node report or a Heap snapsort from the dashboard.

     
     
     
     
     
     

Tags: nodejs