Skip to main content
Limelight runs on Node.js servers too. Add the middleware to capture every incoming request and response — with headers, bodies, status codes, and timing — and view them alongside your client-side data. When you have Limelight on both the client and server, requests are automatically traced end-to-end using a shared trace ID.

Installation

Connect

Initialize Limelight in your server’s entry point, before setting up routes:

Express / Connect

Use Limelight.middleware() to capture all incoming requests. Place it after body-parser middleware so request bodies are available:

Middleware Options

Next.js Pages Router

For Next.js Pages Router API routes (pages/api/), wrap your handler with Limelight.withLimelight():
withLimelight works with Pages Router API routes (pages/api/) which use the Node.js (req, res) signature. It does not work with App Router route handlers (app/api/) which use the Web Standard Request/Response objects. App Router support is coming soon.

Full-Stack Tracing

When Limelight is installed on both your client and server, requests are automatically correlated using a trace header. How it works:
  1. The client SDK attaches an x-limelight-trace-id header to every outgoing request
  2. The server middleware reads this header and links the incoming request to the same trace
  3. Limelight groups both sides together in the UI so you can see the full request lifecycle
No extra configuration is needed — this works automatically.

Custom Trace Header

If x-limelight-trace-id conflicts with your infrastructure, you can customize the header name. Set the same name on both client and server:

Configuration

All standard Limelight.connect() options work on the server. The most relevant ones for server-side usage:

Security

Limelight automatically redacts sensitive headers (like authorization, cookie, and set-cookie) from captured data. You can further control what gets captured:
  • Use disableBodyCapture: true to skip all request/response bodies
  • Use beforeSend to filter out specific routes or redact fields
  • Use maxBodySize on the middleware to limit how much body data is captured

Verify It’s Working

Once connected, make a request to your server and check the Limelight desktop app or dashboard. You should see:
  • The incoming request with method, URL, headers, and body
  • The outgoing response with status code, headers, body, and duration
  • If the client SDK is also connected, both sides linked under the same trace ID