{"slug": "rustrak-a-self-hosted-error-tracker-for-your-existing-sentry-sdks", "title": "Rustrak, a self-hosted error tracker for your existing Sentry SDKs", "summary": "Rustrak released a self-hosted error tracker that speaks the standard Sentry protocol, letting existing Sentry SDKs in any language point at it by changing one DSN string, with no new agent or code rewrite. The single-process server defaults to SQLite and, on a 4-core box, accepts a burst of 20,000 events at about 5k events per second while peaking under 60 MB of memory, using two-phase ingestion that writes envelopes to disk and returns 200 before a spawned task does the database work. Rustrak also ingests logs, transactions, release health and AI-agent traces, grouping events by deterministic fingerprint and offering a PostgreSQL compose option for scale.", "body_md": "Rustrak is a self-hosted error tracker that also takes logs, transactions, release health and AI-agent traces.\n\nIt speaks the Sentry protocol rather than a lookalike of it, so the SDK you already have points at Rustrak by changing one string. No new agent to install, no vendor library to swap, no code to rewrite. It runs as a single process with SQLite by default, which means the whole install is one compose file and nothing to provision.\n\nError tracking usually comes two ways: a SaaS bill that scales with your worst day, or a self-hosted stack that wants its own machine. Rustrak is the third option: the same protocol, on hardware you already have.\n\nTwo design decisions do most of that work. **The dashboard is static files the\nserver hands out**, so one small process answers both the API and the UI, and\nan image built without the dashboard is a complete product on its own. And\n**ingestion is two-phase**. The endpoint parses the envelope, writes\nit to disk and returns `200`; a spawned task then does the database work.\nAccepting an event never waits on the database, which is what stops a traffic\nspike from becoming a timeout inside your app. On a 4-core box with SQLite, a\nburst of 20,000 events is accepted at about 5k events per second with the\nserver peaking under 60 MB of memory.\n\nNo per-event pricing, no sampling you did not ask for, and no seat you have to justify to anyone.\n\nSQLite is the default, so this is the whole install. There is no database to provision and no broker to run.\n\nThis is the repository's `docker-compose.yml`:\n\n```\nservices:\n  server:\n    image: rustrak/rustrak-server:latest\n    ports: [\"8080:8080\"]\n    volumes: [rustrak_data:/data]\n    environment:\n      - SESSION_SECRET_KEY=${SESSION_SECRET_KEY}\n      - CREATE_SUPERUSER=${CREATE_SUPERUSER}\n    restart: unless-stopped\n\nvolumes:\n  rustrak_data:\nexport SESSION_SECRET_KEY=$(openssl rand -hex 32)\nexport CREATE_SUPERUSER=admin@example.com:changeme123\ndocker compose up -d\n```\n\nOpen [http://localhost:8080](http://localhost:8080) and sign in with those credentials. One container\nanswers both the dashboard and the API, so there is no second port and no\naddress to tell one half about the other. Want the dashboard on a different\nhost from your data? `rustrak/rustrak-ui` is the same dashboard behind nginx;\nsee the [production guide](https://rustrak.dev/configuration/production#dashboard-on-its-own-host).\n\nRunning at scale? `docker-compose.postgres.yml` runs the `:postgres` image next\nto a PostgreSQL service. The\n[installation guide](https://rustrak.dev/getting-started/installation)\nhas both setups and the production notes.\n\nRustrak accepts the standard Sentry envelope, so migrating is a configuration change rather than a project. Create a project, copy its DSN, and change one line. Your SDK never learns it is talking to something else.\n\n``` python\n# Python\nimport sentry_sdk\nsentry_sdk.init(dsn=\"http://<key>@localhost:8080/<project_id>\")\n// JavaScript\nimport * as Sentry from \"@sentry/browser\";\nSentry.init({ dsn: \"http://<key>@localhost:8080/<project_id>\" });\n// Go\nsentry.Init(sentry.ClientOptions{Dsn: \"http://<key>@localhost:8080/<project_id>\"})\n```\n\nAny Sentry SDK works, in any language. If you are already sending to Sentry, you can point a second DSN at Rustrak and compare the two before committing.\n\nEvents are grouped into issues by a deterministic fingerprint: the one your SDK sent if it sent one, otherwise exception type plus the first line of the message plus the transaction. Same input, same group, every time, so an issue does not split in two after a deploy.\n\nFrom the list you can triage in bulk, filter by status, and read each issue's 24-hour trend without opening anything. Upload source maps and a minified frame resolves back to the line you actually wrote.\n\nTurn on your SDK's AI integration and agent runs appear on their own page: runs over time, duration percentiles, top models by calls and by tokens, top tools, and a per-trace waterfall of every LLM call, tool call and handoff in order.\n\nRustrak reads Sentry's Spans Protocol v2, the batched format the real SDKs use\nfor AI spans, verified against `@sentry/node` with the Vercel AI SDK. It also\ntakes standalone OTel-style spans that have no parent transaction. When one agent\nhands off to another mid-run, the trace lists every agent involved, not just the\nfirst.\n\nThere is no server-side setup. One integration in `Sentry.init` is the whole\nchange:\n\n```\nimport * as Sentry from '@sentry/node';\n\nSentry.init({\n  dsn: 'http://<key>@localhost:8080/<project_id>',\n  integrations: [Sentry.vercelAIIntegration()],\n});\n```\n\nAnd there is deliberately **no spend widget**. Per-model pricing goes stale\nfaster than we could ship it, so Rustrak reports exact token counts and leaves\nthe multiplication to you.\n\nTransactions and spans flow through a processor pipeline onto a performance dashboard, ranked by p95. Latency is coloured against thresholds rather than left as raw numbers: green under a second, amber under three, red beyond. The row that needs attention is the one that looks wrong.\n\nOpen a transaction for its span waterfall and its measurements.\n\nErrors tell you what broke. Logs tell you what your app was doing when it did\nnot. Rustrak stores structured logs as a first-class event type on the same\nenvelope endpoint, with six severities from `trace` to `fatal`, their own filter,\nand per-row attributes that keep their types.\n\nA log emitted inside an active span carries the `trace_id`, so it links back to\nthe request it came from.\n\nLogging is off by default in Sentry SDKs. Opt in once, then use the logger:\n\n```\nSentry.init({\n  dsn: 'http://<key>@localhost:8080/<project_id>',\n  enableLogs: true,\n});\n\nSentry.logger.info('User signed up', { userId: 4172, plan: 'pro' });\n```\n\nSessions are tracked with full Sentry SDK compatibility and aggregated per\nrelease, which turns \"is this deploy worse than the last one\" into two numbers:\n**crash-free sessions** and **crash-free users**.\n\nBoth are tiered rather than printed flat: green at 99% or above, amber at 95%, red below. A release at 96% is not fine and should not read as if it were.\n\nAlert rules fire on three events, and each rule chooses its own destination:\n\n| Trigger | When it fires | \n|---|---|\n| `new_issue` | A new issue is detected for the first time | \n| `regression` | A resolved issue reappears | \n| `unmute` | A muted issue is unmuted | \n\nDestinations are Slack (incoming webhook or bot token), SMTP email, or a plain JSON webhook. Credentials belong to the instance and are configured once; routing belongs to the rule.\n\nProjects carry three roles, **Admin**, **Member** and **Viewer**, with\ninvitations, so a contractor can be given one project and nothing else.\n\nThe server also reports its own storage usage and enforces configurable retention, with manual cleanup and source-map garbage collection on demand. That matters more on a self-hosted instance than on a hosted one: nobody else is going to notice the disk filling up.\n\n`⌘K` opens a command bar over any screen. Projects and settings are two fixed\nsections, with the highlighted project's pages in a preview column, so Enter on\na project goes to the project and its pages stay one keystroke away. Typing\nflattens everything into one relevance-ordered list.\n\nThe dashboard is a Progressive Web App. Open your Rustrak instance in Safari or Chrome, add it to your home screen, and it launches full screen like a native app, with a bottom tab bar and screens built for touch instead of a shrunken desktop page. There is no app store build and nothing extra to deploy: the phone talks to the same server.\n\nThe REST API has a typed client, and the server has an MCP endpoint built in,\nso an assistant can triage your instance in the same session it is writing the\nfix. Turn it on in **Settings → AI assistants (MCP)** and point Claude, Cursor\nor any MCP client at `https://<your-rustrak>/mcp` with an API token: there is\nnothing to install. See the [MCP guide](https://rustrak.dev/sdks/mcp).\n\n```\nnpm install @rustrak/client   # the REST API, typed\n```\n\n| Package | Version | What it is | \n|---|---|---|\n| [`@rustrak/client`](https://www.npmjs.com/package/@rustrak/client) |  | TypeScript client. Every method returns `Result<T, RustrakError>` and never throws, so a call that can fail says so in its type | \n\nThe OpenAPI spec is browsable in the [API reference](https://rustrak.dev/api-reference).\n\nThe server sends one anonymous report every six hours: version, platform, memory, and counters such as \"how many ingests were rejected\" or \"which routes returned 500\". Never IPs, names, URLs, events or messages. It is what lets a memory regression or a new panic show up across installations after a release, and it costs one atomic increment per request.\n\n```\nRUSTRAK_TELEMETRY=off   # or DO_NOT_TRACK=1; either one is enough\n```\n\nEvery field is listed in the\n[telemetry page](https://rustrak.dev/configuration/telemetry),\nand `GET /api/telemetry/preview` shows the exact document before it leaves.\n\n| [Getting started](https://rustrak.dev/getting-started/overview) | What Rustrak is and how it fits together | \n| [Installation](https://rustrak.dev/getting-started/installation) | Self-hosting, PostgreSQL, production notes | \n| [Configuration](https://rustrak.dev/configuration/environment) | Every environment variable | \n| [API reference](https://rustrak.dev/reference/api) | Endpoints and schemas | \n| [Architecture](https://rustrak.dev/reference/architecture) | Two-phase ingestion, grouping, storage | \n\nQuestions, ideas or something to show? Join [GitHub Discussions](https://github.com/rustrak/rustrak/discussions). Bugs go to [Issues](https://github.com/rustrak/rustrak/issues).\n\nPeople who have contributed code, translations or documentation to Rustrak.\n\n[CONTRIBUTING.md](https://github.com/rustrak/rustrak/blob/main/CONTRIBUTING.md) covers the local setup, the test suite and\nthe quality gate. Issues tagged\n[good first issue](https://github.com/rustrak/rustrak/labels/good%20first%20issue)\nare a reasonable place to start.\n\nRustrak has no paid tier and no hosted plan. Development is funded through\nGitHub Sponsors and [Open Collective](https://opencollective.com/rustrak).\n\n|     [<sub>**Scorewarrior**</sub>](https://github.com/scorewarrior)  |     [<sub>** ZerGo0**</sub>](https://github.com/ZerGo0)  |     [<sub>** Wdes**</sub>](https://wdes.fr/)  | \n\nAGPL-3.0, except `@rustrak/client`, which is MIT. See [LICENSING.md](https://github.com/rustrak/rustrak/blob/main/LICENSING.md). Copyright © 2026 Abian Suarez.", "url": "https://wpnews.pro/news/rustrak-a-self-hosted-error-tracker-for-your-existing-sentry-sdks", "canonical_source": "https://github.com/rustrak/rustrak", "published_at": "2026-11-19 19:49:31+00:00", "updated_at": "2026-11-19 20:15:49.107540+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-tools"], "entities": ["Rustrak", "Sentry", "SQLite", "PostgreSQL", "Rustrak UI"], "also_reported_by": [], "takeaway": "Point an existing Sentry SDK at Rustrak by swapping the DSN to http://<key>@localhost:8080/<project_id>; two-phase ingestion returns 200 before database writes, sustaining about 5k events per second on a 4-core SQLite box under 60 MB of memory.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/rustrak-a-self-hosted-error-tracker-for-your-existing-sentry-sdks", "markdown": "https://wpnews.pro/news/rustrak-a-self-hosted-error-tracker-for-your-existing-sentry-sdks.md", "text": "https://wpnews.pro/news/rustrak-a-self-hosted-error-tracker-for-your-existing-sentry-sdks.txt", "jsonld": "https://wpnews.pro/news/rustrak-a-self-hosted-error-tracker-for-your-existing-sentry-sdks.jsonld"}}