Agent Installation

Configure the low-latency CartNerve edge listener natively targeting your compute environments to collect metrics without blocking execution loops.

Prerequisites

  • Node.js version 18.0.0 or higher.
  • A valid CartNerve project API key generated from your Dashboard.
  • Outbound network access allowing HTTPS requests to CartNerve endpoints.

Environment Configuration

Setup your secure environment variables mapping the telemetry endpoint.

# .env
CARTNERVE_API_KEY=cn_your_generated_key_here
CARTNERVE_PROJECT_ID=uuid-project-identifier

Code Initialization

Wrap your core execution bindings checking metrics before standard listening routines.

import { CartNerveAgent } from '@cartnerve/agent';

const agent = new CartNerveAgent({
  apiKey: process.env.CARTNERVE_API_KEY,
  projectId: process.env.CARTNERVE_PROJECT_ID
});

// Start tracking metrics recursively
agent.startMonitoring();

Troubleshooting Connections

If your agent fails to connect or logs HTTP 401 exceptions, verify your API key accurately. API Keys are mapped securely verifying your project environments against CartNerve authentication constraints. Confirm you haven't exceeded Rate Limits tracking `/api/agent/metrics`.