Documentation

PulseIQ.AI SDK

Install the SDK, stream your logs, and let AI trace errors back to their root cause across your services.

Getting started

PulseIQ.AI ingests logs from your applications and infrastructure, then uses AI to identify root causes and map cascade failures across services. The fastest way to get started is with our Node.js SDK.

Before you begin, you'll need:

  • A PulseIQ.AI account (sign up from the Dashboard)
  • Node.js 18+ or a supported runtime
  • Your project API key from the dashboard

Install the SDK

Install the official PulseIQ.AI SDK using your package manager:

# npm
npm install @pulseiq/sdk

# yarn
yarn add @pulseiq/sdk

# pnpm
pnpm add @pulseiq/sdk

For Python services, use the Python client:

pip install pulseiq

For Go, Rust, or other languages, use our OpenTelemetry exporter or the REST API directly.

API key

Generate an API key from Dashboard → Settings → API Keys. Store it as an environment variable — never commit it to source control.

# .env
PULSEIQ_API_KEY=piq_live_xxxxxxxxxxxxxxxx
PULSEIQ_PROJECT_ID=proj_xxxxxxxx

Configuration

Initialize the SDK as early as possible in your application entry point, before other imports:

import { PulseIQ } from "@pulseiq/sdk";

PulseIQ.init({
  apiKey: process.env.PULSEIQ_API_KEY,
  projectId: process.env.PULSEIQ_PROJECT_ID,
  service: "api-gateway",       // your service name
  environment: "production",      // production | staging | development
  enableCascadeTracing: true,     // map failure chains across services
});

Available configuration options:

OptionRequiredDescription
apiKeyYesYour project API key
projectIdYesProject identifier from the dashboard
serviceYesLogical service name for log grouping
environmentNoDeployment environment (default: production)
enableCascadeTracingNoEnable cross-service failure mapping (default: true)
batchSizeNoLogs per batch before flush (default: 100)
flushIntervalNoFlush interval in ms (default: 5000)

Send logs

The SDK automatically captures unhandled errors and console output. You can also send structured logs manually:

import { PulseIQ } from "@pulseiq/sdk";

// Structured log with metadata
PulseIQ.log("info", "User authenticated", {
  userId: "usr_123",
  method: "oauth",
});

// Error with stack trace — AI will correlate across services
try {
  await processPayment(order);
} catch (error) {
  PulseIQ.captureException(error, {
    orderId: order.id,
    service: "payment-api",
  });
  throw error;
}

For Express, Fastify, or Next.js, use the framework middleware to auto-instrument every request:

// Express
import express from "express";
import { pulseiqMiddleware } from "@pulseiq/sdk/express";

const app = express();
app.use(pulseiqMiddleware());

OpenTelemetry

If you already use OpenTelemetry, point your OTLP exporter to PulseIQ.AI — no SDK required:

# Environment variables
OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.pulseiq.ai/v1/traces
OTEL_EXPORTER_OTLP_HEADERS="x-pulseiq-api-key=${PULSEIQ_API_KEY}"

# Or in your OTel SDK config
exporter: new OTLPTraceExporter({
  url: "https://ingest.pulseiq.ai/v1/traces",
  headers: { "x-pulseiq-api-key": process.env.PULSEIQ_API_KEY },
})

Supported protocols: OTLP/gRPC, OTLP/HTTP, Fluentd, and syslog. See the dashboard for service-specific integration guides.

Cascade analysis

When enableCascadeTracing is on, PulseIQ.AI builds a dependency graph from your logs and traces. During an incident it will:

  1. Identify the first service that emitted an error
  2. Map downstream failures caused by that root event
  3. Generate an AI summary with the failure chain and suggested fixes

Ensure each service uses a unique service name in its SDK config so the graph resolves correctly.

Troubleshooting

Logs not appearing in the dashboard?

Verify your API key, check that PULSEIQ_API_KEY is set in the runtime environment, and confirm outbound HTTPS to ingest.pulseiq.ai is allowed.

Cascade graph is incomplete?

All services in the failure chain must report logs with consistent trace IDs. Use OpenTelemetry or enable distributed tracing headers (x-trace-id) across service boundaries.

Need help?

Open the Dashboard support chat or email support@pulseiq.ai.