Application Performance Monitoring

Follow every request as it traverses your microservices. Identify latency bottlenecks, analyze upstream dependencies, and optimize your backend logic with zero-configuration distributed tracing.

Prerequisites

  • A supported Node.js backend environment.

1. Dashboard Configuration

Before injecting code into your application, you must provision an API key from the Senzor dashboard.

1

Register APM Service

Generate an API key for your specific microservice in the dashboard.

2. SDK Installation

Select your environment below to view the initialization code.

npm install @senzops/apm-node

const senzor = require('@senzops/apm-node');
senzor.init({ apiKey: "<YOUR_APM_KEY>" });

// 1. Request Handler (First)
app.use(senzor.requestHandler());

// ... your routes ...

// 2. Error Handler (Last)
app.use(senzor.errorHandler());

The request handler MUST be the very first middleware to accurately track total request duration.

Troubleshooting & Edge Cases

Durations are incorrect or 0ms in Express.

You must attach `senzor.requestHandler()` as the absolute first middleware, before body-parsers or cors configurations.