SDKs
Wire Dispatch into your stack — a feedback widget for UI apps, headless server-side error tracking for everything else — in about two lines. Install from the registry you already use.
Published on RubyGems as dispatch-rails. Works with Rails 7.1–8.
# Gemfile
gem "dispatch-rails", "~> 0.7"
Then bundle install.
# config/initializers/dispatch.rb
Dispatch::Rails.configure do |c|
c.api_key = Rails.application.credentials.dig(:dispatch, :api_key)
c.enabled_environments = %w[production staging]
c.release = ENV["GIT_SHA"]
# Who's affected — read it from your own auth.
c.user = ->(ctx) { ctx.try(:current_user)&.then { { email: _1.email, external_id: _1.id } } }
end
# API-only app (no UI)? Add headless exception tracking instead of the widget:
# c.mode = :errors_only
Server-side error tracking for Node — global handlers, V8 stack frames with source context. Requires Node 18+.
npm install @dispatchitapp/node
import { init, captureException } from "@dispatchitapp/node";
init({
apiKey: process.env.DISPATCH_API_KEY,
environment: process.env.NODE_ENV,
release: process.env.GIT_SHA,
});
// Global uncaughtException / unhandledRejection handlers are installed for you.
// Capture something by hand:
try {
doRiskyThing();
} catch (err) {
captureException(err, { tags: { area: "import" } });
}
// Express — npm install @dispatchitapp/express
import { errorHandler } from "@dispatchitapp/express";
// Register LAST, after your routes and any other error handlers:
app.use(errorHandler());
// Fastify — npm install @dispatchitapp/fastify
import { dispatchFastify } from "@dispatchitapp/fastify";
await app.register(dispatchFastify);
Catches uncaught errors and unhandled rejections in the browser, with breadcrumbs and the user's click path. Ships an optional feedback widget.
npm install @dispatchitapp/browser
import { init } from "@dispatchitapp/browser";
init({
apiKey: "dsp_live_…",
environment: "production",
// endpoint defaults to https://dispatchit.app — your API key resolves the tenant.
});
<!-- No build step: drop these two tags in your <head>. -->
<script type="application/json" id="dispatch-config">
{ "apiKey": "dsp_live_…", "environment": "production" }
</script>
<script src="https://cdn.jsdelivr.net/npm/@dispatchitapp/browser@1/dist/dispatch.browser.global.js"></script>
<!-- Feedback widget — the floating 💬 button + report modal. -->
<script type="application/json" id="dispatch-widget-config">
{ "apiKey": "dsp_live_…" }
</script>
<script src="https://cdn.jsdelivr.net/npm/@dispatchitapp/browser@1/dist/dispatch.widget.global.js"></script>
Stdlib-only core (a bare install is a working manual-capture SDK), with opt-in adapters for Django, Flask, FastAPI, and Celery. Requires Python 3.9+.
pip install dispatchitapp
import os
import dispatchitapp
dispatchitapp.init(
api_key=os.environ["DISPATCH_API_KEY"],
environment=os.environ.get("ENV", "production"),
release=os.environ.get("GIT_SHA"),
)
try:
do_risky_thing()
except Exception:
dispatchitapp.capture_exception() # reads the current exception
# Framework adapters are opt-in extras:
# pip install "dispatchitapp[django]" # or [flask], [fastapi], [celery]
Every SDK speaks a Sentry-compatible wire format, so a stock Sentry SDK works against a Dispatch DSN too. The endpoints are documented in the API reference.
Browse the HTTP API reference →