Skip to main content

Overview

This guide will walk you through installing the Proliferate SDK, capturing your first error, and viewing it in the dashboard. Choose your platform to get started:
For browser applications, Next.js, React, Vue, and more
Prerequisites: You’ll need a Proliferate account and project. Get your API key from the dashboard.

JavaScript/TypeScript Setup

1

Install the SDK

Install @proliferate/sdk via npm, yarn, or pnpm:
npm install @proliferate/sdk
2

Initialize the SDK

Import and initialize Proliferate at the entry point of your application:
'use client';

import Proliferate from '@proliferate/sdk';
import { useEffect } from 'react';

export default function RootLayout({ children }) {
  useEffect(() => {
    Proliferate.init({
      endpoint: 'https://api.proliferate.com/api/v1/errors',
      apiKey: 'pk_your_api_key_here',
      environment: process.env.NODE_ENV,
      // Replay is enabled by default
    });
  }, []);

  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  );
}
Replace pk_your_api_key_here with your actual API key from the dashboard.
3

Add user and account context (optional)

After a user logs in, set context to enrich error reports:
// When user logs in
Proliferate.setUser({
  id: 'user_123',
  email: '[email protected]'
});

// For B2B apps: set account/organization context
Proliferate.setAccount({
  id: 'acct_456',
  name: 'Acme Corp'
});
This context will be attached to all errors captured from this point forward, helping you understand which users and customers are affected.
4

Trigger a test error

Add a button to trigger a test error and verify the integration:
function TestErrorButton() {
  const triggerError = () => {
    // This will be automatically captured by Proliferate
    throw new Error('Test error from Proliferate quickstart');
  };

  return (
    <button onClick={triggerError}>
      Trigger Test Error
    </button>
  );
}
Click the button, and the error will be sent to Proliferate!
5

View in dashboard

Open the Proliferate dashboard and navigate to your project. You should see your test error in the issues list.Click on the issue to see:
  • Stack trace with source-mapped frames
  • User and account context you set
  • Session replay showing what happened before the error
  • Breadcrumbs (console logs, network requests, clicks)
Success! You’ve successfully integrated Proliferate into your JavaScript application.

Python Setup

1

Install the SDK

Install proliferate via pip:
pip install proliferate
2

Initialize the SDK

Import and initialize Proliferate at your application’s entry point:
import proliferate
from proliferate.integrations.fastapi import ProliferateMiddleware
from fastapi import FastAPI

# Initialize SDK
proliferate.init(
    endpoint='https://api.proliferate.com/api/v1/errors',
    api_key='pk_your_api_key_here',
    # environment and release are auto-detected from env vars
)

app = FastAPI()

# Add middleware for automatic error capture
app.add_middleware(ProliferateMiddleware)

@app.get("/")
async def root():
    return {"message": "Hello World"}
The SDK auto-detects environment from ENVIRONMENT, ENV, or PYTHON_ENV variables, and release from CI environment variables like GITHUB_SHA.
3

Add user and account context (optional)

In your route handlers or middleware, set context for error reports:
from fastapi import Request, Depends
import proliferate

@app.post("/api/checkout")
async def checkout(request: Request, user: User = Depends(get_current_user)):
    # Set user context
    proliferate.set_user({
        "id": user.id,
        "email": user.email
    })

    # Set account context for B2B apps
    proliferate.set_account({
        "id": user.account_id,
        "name": user.account_name
    })

    # Add custom tags
    proliferate.set_tag("endpoint", "checkout")

    # Your business logic here
    # Any unhandled exception will include all this context
Context is stored in contextvars and is automatically isolated per request/task, making it async-safe.
4

Trigger a test error

Add a test endpoint to trigger an error:
@app.get("/test-error")
async def test_error():
    # Set some context
    proliferate.set_user({"id": "test_user"})
    proliferate.set_tag("test", True)

    # Trigger an error - will be automatically captured
    raise ValueError("Test error from Proliferate quickstart")
Visit http://localhost:8000/test-error to trigger the error.Alternative: Manual capture for handled exceptions
try:
    result = risky_operation()
except PaymentDeclined as e:
    # Capture but don't re-raise
    proliferate.capture_exception(e, extra={"order_id": "123"})
    return {"error": "Payment declined"}
5

View in dashboard

Open the Proliferate dashboard and navigate to your project. You should see your test error in the issues list.Click on the issue to see:
  • Full Python traceback
  • User and account context you set
  • Custom tags
  • Request information (method, URL, headers, client IP)
Success! You’ve successfully integrated Proliferate into your Python application.

Next Steps

Now that Proliferate is capturing errors, explore these features:
Need help? Email us at [email protected]