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
- A Node.js, Python, or Go service
- An Incidentary account (sign up at incidentary.com)
Step 1 — Create a workspace and API token
- Log in to your Incidentary dashboard.
- Go to Settings → Workspaces → New Workspace.
- 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-goStep 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
- How It Works — understand what the SDK captures and where it goes
- SDK Configuration — all environment variables and init options
- Concepts: Traces & Spans — the data model