Download page Object Instance Tracking for Node.js.
Object Instance Tracking for Node.js
This page describes how to enable object instance tracking for Node.js. The Node.js Agent provides object instance tracking (OIT) for monitoring memory usage. When you enable object instance tracking for a node, the Node.js Agent attempts to identify the object types with the most instances on the heap. The agent tracks the top 20 object types based upon the number of instances. Use object instance tracking to identify memory usage trends in objects with large numbers of instances.
Enable Object Instance Tracking on a Node
- In the left navigation pane, click Tiers & Nodes.
- In the Tiers & Nodes panel navigate to and select the node that you want to track.
- Double-click or click View Dashboard.
- In the node dashboard, click the Memory tab.
- Click the Object Instance Tracking subtab.
Click On to start tracking. After completing the heap analysis, the agent begins tracking the top 20 object types in the heap.
- When you are finished tracking, click Off because tracking can slow down the Node.js process. Use OIT for only for brief periods.
Although the Node.js OIT UI displays "Class" and "Classes" throughout, the Node.js Agent tracks object types, not classes. Substitute "object" for "class" wherever you see "class" for this feature.
Identify Memory Usage Problems
Use these guidelines to identify memory usage problems:
- The Node.js Agent attempts to report once per minute, but on a heavily loaded, memory-saturated application it could be less often.
- It is normal for the controller to display 0 for the Current Instance Count and Shallow Size between instance count collection times.
- Hover over a peak in the graph to display information about the instance count.
- Look for trends where the peaks increase in size from left to right. These may indicate a memory leak.
Track Object Instances for Custom Object Types
If you want to track an object that does not appear in the top 20 on the Object Instance Tracking tab, you can configure a specific object to track.
- In the Object Instance Tracking tab, click Configure Custom Classes to Track.
- In the Define Custom Classes to Track panel, click Add. The Create New Instance Tracker panel opens.
- Leave Enabled checked.
- Enter the object for the instance to track.
- Click Save. The configured object is added to the objects to track when OIT is on.
Examine OIT Metrics in the Metric Browser
When enabled, OIT metrics are also reported under the Application Infrastructure Performance > <tier> > Individual Nodes > <node> > Object Instance Tracking branch in the Metric Browser.