Error tracking
errors speaks the Sentry ingest protocol: official SDKs send straight to
errors.xvii.network. There is no external Sentry account.
Connect an app
Create a project in errors and link it to an app: apps hands the app SENTRY_DSN, SENTRY_RELEASE and
SENTRY_ENVIRONMENT at its next deploy, and every deploy becomes a release.
sentry.Init(sentry.ClientOptions{
Dsn: os.Getenv("SENTRY_DSN"),
Release: os.Getenv("SENTRY_RELEASE"),
Environment: os.Getenv("SENTRY_ENVIRONMENT"),
})
defer sentry.Flush(2 * time.Second)
import * as Sentry from "@sentry/node"
Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 0 })
Initialise it on the server only; keep it out of browser bundles.
import os, sentry_sdk
sentry_sdk.init(dsn=os.environ["SENTRY_DSN"], traces_sample_rate=0)
let _guard = sentry::init((std::env::var("SENTRY_DSN").ok(), sentry::ClientOptions {
release: sentry::release_name!(),
..Default::default()
}));
Keep the guard alive for the whole process.
Capture unexpected failures (5xx, panics), not expected ones like a wrong password.
Static sites
Link a pages alias to the project: pages puts https://errors.xvii.network/js/<key>.js into every HTML page.
It reports uncaught errors and rejected promises; window.xviiErrors.capture(error) reports by hand. For
other sites, add the script yourself and allow its origin in your CSP's script-src and connect-src.
What happens to an event
- Scrubbing: passwords, tokens, cookies, keys, card numbers and your project's own fields are removed
anywhere in the event, headers and query strings; IPs from
{{auto}} are dropped; people are counted by
a hash.
- Grouping: by the exception type and its five nearest in-app frames (no line numbers), else the type
and a normalised message. A
fingerprint from the SDK wins.
- Issues: unresolved, resolved (or resolved in the next release), ignored (for good or for N more
events). New and regressed issues and spikes go to notify.
Turn tracing and replays off: errors accepts and drops transactions and replays. Don't send request
bodies, cookies or authorization headers in the first place.
Rate limits
Past the project's per-minute rate or the team's monthly errors.events, ingest answers 429 with
Sentry's rate-limit headers and SDKs back off.
Check it end to end
Throw a test error from the deployed app, confirm it lands in the right project and environment, then
resolve it. An SDK that imports fine and an empty dashboard prove nothing.