Incidentary Docs

Quickstart

Instrument your first service and capture your first trace in under 5 minutes.

Quickstart

Get from zero to a captured trace in under 5 minutes.

Prerequisites

Step 1 — Create a workspace and API token

  1. Log in to your Incidentary dashboard.
  2. Go to Settings → Workspaces → New Workspace.
  3. Go to Settings → API Keys → Create Key and copy the sk_... token.

Step 2 — Install the SDK

# Node.js
npm install @incidentary/sdk-node

# Python
pip install incidentary-sdk

# Go
go get github.com/incidentary/sdk-go

Step 3 — Add the middleware

Pick your runtime:

// Node.js (Express)
import { IncidentaryClient, createExpressMiddleware } from '@incidentary/sdk-node';

const client = new IncidentaryClient({
  apiKey: process.env.INCIDENTARY_API_KEY,
  serviceName: 'my-service',
  workspaceId: process.env.INCIDENTARY_WORKSPACE_ID,
});

app.use(createExpressMiddleware(client));
# Python (FastAPI)
from incidentary import IncidentaryClient, FastAPIMiddleware

client = IncidentaryClient(
    api_key=os.environ["INCIDENTARY_API_KEY"],
    service_name="my-service",
    workspace_id=os.environ["INCIDENTARY_WORKSPACE_ID"],
)

app.add_middleware(FastAPIMiddleware, client=client)
// Go (net/http)
import "github.com/incidentary/sdk-go"

client := incidentary.NewClient(incidentary.Config{
    APIKey:      os.Getenv("INCIDENTARY_API_KEY"),
    ServiceName: "my-service",
    WorkspaceID: os.Getenv("INCIDENTARY_WORKSPACE_ID"),
})

handler := incidentary.Middleware(client)(yourHandler)

Step 4 — Trigger a request

Send any HTTP request to your instrumented service. The SDK will capture the causal event and flush it to Incidentary.

Step 5 — Open the trace

Within seconds, the trace appears in your Incidentary dashboard. Click any trace to see the causal waterfall — every span, every service hop, every status code, in order.

The first trace is captured during a pre-arm window. If you configured a pre-arm duration, trace data collected before your first alert is retained for that window. See Pre-Arm for details.

Next steps

On this page