CControxity Docs
GuidesReferenceHTTP APIOpen Controxity
Start here

Your first error in 5 minutes

Add a product, get a key, send one error, and see it explained on Problems.

1. Add your product#

In Controxity, on Today, press Add a product. Give it a name and the address of its code (https://github.com/you/shop.git). For private code, add a token that can read it: on GitHub, a fine-grained token with that one repository and Contents: Read-only. Controxity keeps its own copy of the code and never changes your repository with it.

Controxity sets up the rest from the code by itself. You can change any of it later:

2. Say where it runs, and get a key#

Open the product, then Where it runs → Add a place: its name (Shop live), staging or production. If the product is in parts (a server, a web app, a phone app), the place gets the part its name or kind says (Shop web → web, Android → the phone part, else the server part); change it under Change. Press Get a key. The key is shown once: keep it in your server's environment.

Under the places, Setup lists what each place still needs, in order: a button for what's done in Controxity, and one line to copy for what runs on your machine. Each step ticks itself when Controxity sees it done, and Today shows a place that isn't set up yet. Every kind of place, with pictures: Every place, step by step.

CONTROXITY_KEY=dep_••••••••••••••••
CONTROXITY_URL=https://controxity.example.com
Never put a dep_ key in a web page or a phone app. For a page, use a browser key (pub_, it can only send). For a phone app, send its crashes through your server: see Phone apps.

3. Put the SDK in#

The SDK is one file, kept with your code (it isn't on npm or PyPI yet). In your server's folder:

curl -fsSL https://controxity.example.com/sdk/node.js -o controxity.js

Use your Controxity's address; Connect on the product's page shows the line with it in. With TypeScript, also curl -fsSL …/sdk/node.d.ts -o controxity.d.ts.

const controxity = require("./controxity");
controxity.init({ key: process.env.CONTROXITY_KEY, url: process.env.CONTROXITY_URL, version: "1.0.0" });

app.use(controxity.express());   // Express: after your routes

4. Send one error#

Make a route throw, or call the check:

console.log(await controxity.check());   // { ok: true, why: "Connected to …" }

Within a minute the error is on Problems: what it is in plain words, where it happened, how often, and on which version. The place shows Up on Where it runs: the SDK sends a heartbeat every minute.

Next#

Controxity 1.132.0These pages are in the repository: docs/site