DEVELOPER DOCUMENTATION

Universal Ingestion & Developer Quickstarts

Send operational telemetry to Lazers via native SDKs or standard OpenTelemetry exporters in just a few lines of code.

Authentication Architecture

Lazers enforces a strict two-tier credential model to ensure backend secrets are never exposed to browser or mobile clients.

Server API Key (Backend & OTLP)
Prefix: laz_live_...
Header: x-lazers-api-key: <key>

Trusted credential for servers, cron jobs, microservices, and OpenTelemetry collectors.

Client DSN (Browser & Mobile)
Prefix: laz_ci_...
Header: x-lazers-client-dsn: <dsn>

Client-safe, write-only DSN for frontend single-page apps, iOS, Android, and Flutter apps.

OpenTelemetry OTLP/HTTP Compatibility

Lazers provides standard OTLP/HTTP endpoints for logs and traces. Send data from any OTel collector without rewriting existing instrumentation.

# Standard OpenTelemetry Collector Configuration
receivers:
  otlp:
    protocols:
      http:
      grpc:

processors:
  batch:

exporters:
  otlphttp/lazers:
    endpoint: "https://api.lazers.app"
    headers:
      x-lazers-api-key: "${LAZERS_SERVER_API_KEY}"

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/lazers]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/lazers]

Native SDK Quickstarts

Native SDKs provide automatic unhandled rejection hooks, structured breadcrumbs, and lightweight in-memory batching.

Node.js / Express
npm install @lazers/agent-sdk

import { createLazersAgent } from "@lazers/agent-sdk";
const lazers = createLazersAgent({
  apiKey: process.env.LAZERS_API_KEY,
  endpoint: "https://api.lazers.app",
  projectId: "prj_production_1",
  environment: "production",
  serviceName: "billing-service"
});
Python / FastAPI
pip install lazers

from lazers import LazersClient
lazers = LazersClient(
    api_key=os.environ["LAZERS_API_KEY"],
    endpoint="https://api.lazers.app",
    project_id="prj_production_1",
    environment="production",
    service_name="orders-service"
)

Operational Troubleshooting Reference

Diagnostic matrix covering 401s, 429 rate limits, network timeouts, dropped signals, and collector configuration.