Installation
Requirements
- Node.js 18 or later
- npm, yarn, or pnpm
Install the SDK
npm install @ladger/sdkyarn add @ladger/sdkpnpm add @ladger/sdkVerify Installation
Create a simple test to verify the SDK is installed correctly:
import { LadgerTracer } from '@ladger/sdk';
// This should not throw an errorconsole.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:
| Package | Size (minified) | Size (gzipped) |
|---|---|---|
| @ladger/sdk | ~8 KB | ~3 KB |
Next Steps
Once installed, you’ll need to:
- Get an API key from the Ladger dashboard
- Follow the Quickstart guide to send your first trace