Install the SDK, set the DSN, run your app, watch the event arrive in the live feed. Then add an alert rule and you're done.
Go to app.coderadar.app/sign-in. Sign in with the Goodventures Clerk session. You should see the project picker. If your project doesn't exist yet, create it from Settings → Projects → New project. The wizard hands you the DSN.
Pick your runtime.
pnpm add @coderadar/sdk
# or: npm install @coderadar/sdk
# or: yarn add @coderadar/sdk
pnpm add @coderadar/browser
# or paste the script tag in the browser tab below
pip install coderadar
# or: poetry add coderadar
# or: uv add coderadar
go get github.com/RelayOne/coderadar/sdks/go/coderadar
Earlier is better. The SDK needs to be initialized before any code that might throw.
// instrumentation.ts (Next.js) or src/init.ts (others)
import { init } from "@coderadar/sdk";
init({
dsn: process.env.CODERADAR_DSN,
project: "truecom",
environment: process.env.NODE_ENV,
release: process.env.RELEASE_SHA,
tracesSampleRate: 0.2,
});
<script
src="https://cdn.coderadar.app/v1/sdk.js"
data-project="truecom"
data-env="production"
data-release="[email protected]">
</script>
import os
import coderadar
from coderadar.fastapi import CodeRadarMiddleware
coderadar.init(
dsn=os.environ["CODERADAR_DSN"],
project="veritize",
environment=os.environ.get("ENV"),
release=os.environ.get("RELEASE_SHA"),
traces_sample_rate=0.2,
)
app = FastAPI()
app.add_middleware(CodeRadarMiddleware)
import "github.com/RelayOne/coderadar/sdks/go/coderadar"
cr, _ := coderadar.NewClient(coderadar.Config{
DSN: os.Getenv("CODERADAR_DSN"),
Project: "relaygate",
Environment: os.Getenv("ENV"),
Release: os.Getenv("RELEASE_SHA"),
SampleRate: 1.0,
TracesSampleRate: 0.2,
})
defer cr.Flush()
http.ListenAndServe(":8080", coderadar.WrapHandler(mux))
Get the DSN from the project's Settings → Keys page. Paste it into your environment.
export CODERADAR_DSN="https://[email protected]/12"
The public part of the DSN is safe to expose in browser bundles. For stricter setups use the server-only DSN with a Bearer token; see Concepts.
Throw something. The SDK will catch it.
// Node / Browser
import { captureException } from "@coderadar/sdk";
captureException(new Error("hello from quickstart"));
// Python
import coderadar
coderadar.capture_exception(Exception("hello from quickstart"))
// Go
cr.CaptureException(errors.New("hello from quickstart"))
Open app.coderadar.app and pick your project. Within a second, the test event should appear in the live feed at the top. Click it to see breadcrumbs, runtime info, the user object (if you set one), tags, and the trace it was part of (if there was one).
Run the SDK in debug mode (CODERADAR_DEBUG=1) and check stderr for SDK self-logs. Common causes: wrong DSN format, network egress blocked, sample rate set to 0, or the SDK's flush hasn't fired yet (give it 5 seconds).
Releases let CodeRadar associate errors with a specific deploy. Two ways:
release in the SDK init options (recommended).coderadar releases create --project=truecom --release=truecom@$SHORT_SHA --commit=$COMMIT_SHA in CI.Without source maps, browser stack traces are minified gibberish. Upload them as part of your release pipeline.
pnpm dlx @coderadar/cli sourcemaps upload \
--project=truecom \
--release=truecom@$SHORT_SHA \
--rewrite \
--strip-common-prefix \
dist/static/js/
Either click Alerts → New rule in the dashboard, or check this YAML into .coderadar/alerts.yaml in your repo:
version: 1
project: truecom
rules:
- name: fatal_in_production
when: "level:fatal env:production"
threshold: "count > 0 in 1m"
channels: [slack-prod]
cooldown: 5m
channels:
- id: slack-prod
type: slack
webhook: ${SLACK_WEBHOOK_URL}
Apply with coderadar alerts apply --file=.coderadar/alerts.yaml. The next time a fatal-level event lands in production, your Slack channel gets pinged.
You have errors flowing in, traces being captured, and one alert wired up. Read the Concepts guide for the full mental model, or jump to the Node / Browser / Python / Go SDK reference.