---
title: "Node.js Custom Instrumentation"
slug: "nodejs-custom-instrumentation"
updated: 2020-02-27T22:35:19Z
published: 2020-02-27T22:35:19Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js Custom Instrumentation

## Configuration

**Custom Instrumentation** allows you to track classes and functions not natively supported in our Node.js Profiler. This requires adding an **instrumentation** section to your `stackify.js` configuration file.

**Example:**

```
/**
 * Stackify Node APM Configuration
 */
exports.config = {
  /**
   * Your application name.
   */
  application_name: 'Node Application',
  /**
   * Your environment name.
   */
  environment_name: 'Production',
  /**
   * Your custom instrumentation.
   */
  instrumentations: [
    // custom instrumentation on a local class file
    {
      module: './other.js',
      class: 'Other',
      method: 'execute'
    },
    // custom instrumentation on a 3rd party module class
    {
      module: 'random',
      class: 'Random',
      method: 'boolean'
    }
  ]
}
```

## Tracked Functions

**Tracked Functions** allows you to track a specific method call across requests, data will show up in your application dashboard under the **Tracked Functions** tab.

**Example:**

```
{
    module: 'random',
    class: 'Random',
    method: 'boolean',
    trackedFunction: true,
}
```
