Skip to content

Installation

Requirements

  • Node.js 18 or later
  • npm, yarn, or pnpm

Install the SDK

Terminal window
npm install @ladger/sdk

Verify Installation

Create a simple test to verify the SDK is installed correctly:

import { LadgerTracer } from '@ladger/sdk';
// This should not throw an error
console.log('Ladger SDK installed successfully!');

TypeScript Support

The SDK is written in TypeScript and includes full type definitions out of the box. No additional @types packages are required.

import type { LadgerConfig, LadgerSpan, CostEvent } from '@ladger/sdk';

Bundle Size

The Ladger SDK is designed to be lightweight:

PackageSize (minified)Size (gzipped)
@ladger/sdk~8 KB~3 KB

Next Steps

Once installed, you’ll need to:

  1. Get an API key from the Ladger dashboard
  2. Follow the Quickstart guide to send your first trace