Track your product’s errors
Canopus groups every error into problems, tells you who it hits and what it costs, keeps the logs of the request, and emails you once per new problem. It speaks the Sentry protocol: an existing Sentry setup moves by changing one line. If you code with an assistant, the setup guide gives the prompt that does it.
Three ways in
With your assistant
On the Setup page, the Error tracking step gives a prompt. Your assistant gets the DSN through the MCP server (set_up_error_tracking), points or installs the Sentry SDK, adds the release and the source maps, throws a test error and checks it arrived.
Already on Sentry
Replace the Sentry DSN with the Canopus DSN (Customers, Errors), set tracesSampleRate and replaysSessionSampleRate to 0, and add the source maps script to the build. Nothing else changes. See the migration page.
By hand
The measurement snippet already reports browser errors, five per page at most. For a server without a Sentry SDK, post errors to POST /api/v1/errors with an API key that has the "Send errors" scope.
import * as Sentry from '@sentry/nextjs'
Sentry.init({
dsn: process.env.CANOPUS_DSN,
release: process.env.VERCEL_GIT_COMMIT_SHA,
enableLogs: true,
tracesSampleRate: 0,
replaysSessionSampleRate: 0,
sendDefaultPii: false,
})The DSN is public by design: it ships in your browser bundle and only lets a caller add errors, never read them. Rotate it from Customers, Errors if it leaks into the wrong place; the old one stops at once.
POST /api/v1/errors
Up to 50 errors per call, 512 KB per body. Send the stack as the engine wrote it (error.stack) and Canopus reads the frames; frames already parsed are accepted too. A retry with the same eventId is stored once. Answers 202 with the problems the errors landed on.
curl -X POST https://www.canopushq.io/api/v1/errors \
-H "Authorization: Bearer $CANOPUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"errors": [{
"eventId": "b1946ac92492d2347c6235b4d2611184",
"release": "2026.11.23",
"environment": "production",
"exceptions": [{ "type": "TypeError", "value": "total is undefined", "stack": "TypeError: total is undefined\n at charge (/app/billing.js:42:7)" }],
"url": "https://app.example.com/billing",
"user": { "id": "usr_123" },
"traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
"serverName": "web-1"
}]
}'- exceptions
- Up to 10 chained exceptions, the raised one last, each with type, value and stack or frames.
- message
- For an error without an exception. One of the two is required.
- user.id
- Your product’s user id: how a problem names the contacts and paying customers it hit. An email may be sent to find the contact; it is never stored.
- release, environment
- Which deploy brought the problem; production by default.
- traceId, serverName
- How the logs of the same request are attached to the error.
- fingerprint
- Replaces the grouping; {{ default }} keeps Canopus’s rule inside it.
- tags, extra, contexts, breadcrumbs
- Kept after scrubbing, like Sentry’s.
Logs
With a Sentry SDK, turn on enableLogs: Sentry.logger lines and the console integration reach Canopus with the trace of their request. Without one, post up to 1,000 lines per call (1 MB) to POST /api/v1/logs with the same key.
Lines are scrubbed like errors and kept 7 days, searchable from Customers, Errors, Logs. The lines of a kept error’s request (same trace, from 15 minutes before to a minute after) are copied onto the error and kept as long as it. One line holds 8 KB at most. A backend logging in a loop is slowed down past 6,000 lines a minute; its errors still come in.
curl -X POST https://www.canopushq.io/api/v1/logs \
-H "Authorization: Bearer $CANOPUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"logs": [
{ "level": "info", "message": "charging customer", "traceId": "4bf92f3577b34da6a3ce929d0e0e4736", "server": "web-1", "attributes": { "orderId": "ord_42" } }
]
}'Source maps and releases
A minified stack is decoded with the release’s source maps, so a problem shows your file, line, function and code, and two deploys of the same bug stay one problem. Download canopus-sourcemaps.mjs from https://www.canopushq.io/canopus-sourcemaps.mjs, then run it after the build with an API key that has the "Upload source maps" scope. It reads the release from CANOPUS_RELEASE, VERCEL_GIT_COMMIT_SHA or GITHUB_SHA, uploads every map straight to Canopus’s private storage, and with --delete removes them from the output so they are never served.
Set the same release in Sentry.init. "Resolved in the next release" then reopens a problem only if it happens again in a newer release.
# after the build, with CANOPUS_API_KEY (scope sourcemaps:write) in the environment
node canopus-sourcemaps.mjs --dir .next/static --url-prefix /_next/static --deleteWhat is filtered
- Replaced by [Filtered] before anything is stored: email addresses, IP addresses, tokens and API keys of known shapes, JWTs, bearer headers, card numbers (Luhn checked), IBANs, secrets written in code (password: "…"), and any value whose key names a secret.
- Never kept: cookies, request bodies, query strings (only the parameter names), headers outside a short list, the user’s address and IP.
- Kept: messages, stacks, the code around each line, local variables after scrubbing, breadcrumbs, browser and system, the page without its query string, your product’s user id.
Quotas and limits
| Plan | Errors per month | Logs per month |
|---|---|---|
| Starter | 3,000 | 200 MB |
| Growth | 15,000 | 1 GB |
| Scale | 50,000 | 5 GB |
- Every event is counted; five per problem and per hour are kept with their detail. A loop of a thousand identical errors counts a thousand and keeps five.
- Events are kept 90 days, with the logs attached to them; other logs 7 days.
- Not part of Canopus: performance traces, session replay, profiling, native and mobile symbolication. A Sentry SDK with tracing on is told to stop sending them.
- An SDK that sends too much receives the Sentry rate limit headers and waits; nothing is ever billed beyond your plan.