Getting Started
10-Minute Primary Quickstart
Step-by-step guide to sending your first verified operational signal to Lazers in under 10 minutes.
Best Practice
When running in AWS Lambda, Cloud Functions, or cron jobs, always await `client.flush()` before exiting to ensure in-memory buffers reach the API.
Goal: First Signal in Under 10 Minutes
Follow these 4 simple steps to connect your service:
Step 1: Obtain Your Credential In the Lazers console, navigate to **Settings -> API Keys** and click **Create Key**: - Name: `api-production` - Environment: `production` - Copy the secret key: `laz_live_your_secret_key_here`
Step 2: Install the Native SDK Choose your package manager: - **Node.js**: `pnpm add @lazers/agent-sdk` (or `npm install @lazers/agent-sdk`) - **Python**: `pip install lazers` - **PHP**: `composer require oneverse/lazers` - **Go**: `go get github.com/Emmydapson/lazers/packages/go-sdk` - **Java**: `implementation 'com.oneverse:lazers:0.1.0'` - **.NET**: `dotnet add package Oneverse.Lazers` - **Flutter**: `flutter pub add lazers_flutter`
Step 3: Initialize and Send a Test Signal Add the initialization snippet to your application entry point:
Integration Code Examples
Node.js (TypeScript)
import { createLazersAgent } from "@lazers/agent-sdk";
const lazers = createLazersAgent({
apiKey: process.env.LAZERS_API_KEY!, // laz_live_...
endpoint: "https://api.lazers.app",
projectId: "prj_production_1",
environment: "production",
serviceName: "billing-service",
release: "c80c6d2", // optional: real git commit SHA or semver
});
// Capture your first test error with actor context
try {
throw new Error("Initial setup verification error");
} catch (error) {
await lazers.captureError(error, {
actor: { type: "user", id: "user_setup_1", label: "Dev Tester" },
correlationId: "order_test_99",
});
}
// Ensure in-flight queue drains before process terminates
await lazers.flush();cURL Direct Verification
curl -X POST "https://api.lazers.app/signals/ingest" \
-H "content-type: application/json" \
-H "x-lazers-api-key: laz_live_YOUR_KEY" \
-d '{
"protocolVersion": "1",
"projectId": "YOUR_PROJECT_ID",
"environment": "production",
"serviceName": "api-quickstart",
"eventCategory": "message",
"severity": "info",
"message": "First signal verified from cURL",
"occurredAt": "2026-11-15T14:00:00.000Z",
"source": { "type": "agent_sdk", "provider": "curl" },
"actor": { "type": "user", "id": "admin_1" }
}'