Rustrak Puts Your AI Agent Traces on Your Own Server. Check Three Settings First.
A self-hosted, Sentry-compatible error tracker now shows every LLM call and tool call your agent makes. Here is how to set it up, and what to switch off first.
The most sensitive data in an AI app is often not in the database. It is in the traces.
When you turn on tracing for an agent, each run gets recorded as a chain of steps: the model call, the tool it picked, the next model call, the handoff to another agent. Useful for debugging. But Sentry's own documentation for its Vercel AI SDK integration says that recording of inputs and outputs is on by default (Sentry docs). In practice that means your error tracker can end up holding a copy of what users typed and what the model said back.
So the question "where do my traces live?" has become "where do my users' conversations live?" For a lot of teams the honest answer is "on a vendor's servers, priced per event."
Rustrak, which shipped v0.30.1 on November 20, offers a different answer. It is a self-hosted error tracker that speaks the Sentry protocol (the format Sentry's libraries use to report errors and traces), so the Sentry SDK you already use can send to it by changing one string. And it has a page built for AI agent runs.
This piece covers what Rustrak does, how to get agent traces into it in about ten minutes, and the three settings worth checking before it sees real traffic.
What Rustrak is, in plain terms
An error tracker is the service your app reports crashes to. Sentry is the best-known one. Its software development kits (SDKs, the small libraries you add to your app) package each error into a standard format called an envelope and send it to an address called a DSN.
Rustrak accepts that same envelope. The README puts it directly: it "speaks the Sentry protocol rather than a lookalike of it, so the SDK you already have points at Rustrak by changing one string."
Think of it like changing the mailing address on a form you already fill out. The form stays the same. The letters go to your own mailbox.
A few details make it practical to run:
- One container. It runs as a single process with SQLite by default, so there is no separate database to set up. A PostgreSQL setup exists for bigger installs.
- It does not choke on spikes. Ingestion is two-phase: the server writes each incoming event to disk, returns success, and does the database work afterward. The project's own test on a 4-core box accepted a burst of 20,000 events at about 5,000 per second, with the server process peaking under 60 MB of memory. That is the maintainer's measurement, not an independent one.
- More than errors. It also takes logs, performance traces, release health (crash-free sessions per release) and alerts to Slack, email or a webhook.
It is written in Rust, has about 1.3k GitHub stars as of November 21, 2026, and says it has "no paid tier and no hosted plan."
The agent traces page
This is the part that makes Rustrak an AI story rather than another Sentry clone.
Turn on your SDK's AI integration and agent runs land on their own page. According to the README, you get runs over time, duration percentiles, the top models by calls and by tokens, the top tools, and a step-by-step waterfall of every LLM call, tool call and handoff in each run. When one agent hands off to another mid-run, the trace lists every agent involved.
Under the hood, Rustrak reads Sentry's Spans Protocol v2, the batched format Sentry's SDKs use for AI spans, and the README says this was verified against @sentry/node with the Vercel AI SDK. (A span is one timed step inside a trace.)
One design choice is worth noticing. There is "deliberately no spend widget." The README says per-model prices go stale faster than the project could update them, so Rustrak shows exact token counts and leaves the dollar math to you. I like that call. A cost chart built on last month's price list is worse than no chart.
Set it up in ten minutes
You need Docker and an app that already uses (or can use) a Sentry SDK. These steps come from the README and Sentry's integration docs.
1. Start the server. The repository's docker-compose.yml is short. Set two environment variables and bring it up:
export SESSION_SECRET_KEY=$(openssl rand -hex 32)
export CREATE_SUPERUSER=admin@example.com:changeme123
docker compose up -d
Open http://localhost:8080 and sign in with those credentials. Change that password before anyone else can reach the box, and read the project's installation guide, which carries the production notes, before you expose it beyond your own machine.
2. Create a project and copy its DSN. It looks like http://<key>@localhost:8080/<project_id>.
3. Point your SDK at it and turn on the AI integration. For a Node app using the Vercel AI SDK:
import * as Sentry from '@sentry/node';
Sentry.init({
dsn: 'http://<key>@localhost:8080/<project_id>',
tracesSampleRate: 1.0,
integrations: [Sentry.vercelAIIntegration()],
});
Sentry's docs say this integration needs SDK version 11.0.0 or higher and is enabled by default when tracing is on. Run a few agent calls and the agent page should start filling in.
If you already send errors to Sentry, the README suggests pointing a second DSN at Rustrak and comparing the two before you switch.
Setting 1: decide whether prompts and outputs get recorded
Here is the setting most people never look at.
Sentry's docs list two options on the Vercel AI integration, recordInputs and recordOutputs. Both default to true when the SDK's data collection settings for AI inputs and outputs are on, "which is the default." So unless you say otherwise, a trace can include the prompt and the model's reply.
On a self-hosted Rustrak box that may be exactly what you want: full context for debugging, kept on your own hardware. But make it a decision, not an accident. If the traces could hold customer data you are not allowed to keep, switch recording off and keep the timing, token and tool data:
integrations: [
Sentry.vercelAIIntegration({ recordInputs: false, recordOutputs: false }),
],
Either way, set Rustrak's retention to match how long you are allowed to keep that data. The server enforces configurable retention, and the README makes a fair point: on a self-hosted instance, nobody else will notice the disk filling up.
Setting 2: the telemetry switch
Rustrak's server sends the project an anonymous report every six hours. The telemetry page lists every field: version, platform, memory use, ingest counters, error counts by route pattern and similar health numbers, with volumes blurred to two significant digits. It says it never sends IP addresses, hostnames, DSNs, event payloads, stack traces or error messages. The first report goes out about ten minutes after startup.
That is a reasonable, well-documented design. It is on by default in the official builds (the docs say a binary you compile yourself has it off), and plenty of teams self-host specifically so nothing leaves the network. You can look before you decide:
curl -H "Authorization: Bearer $TOKEN" http://localhost:8080/api/telemetry/preview
That returns the next report exactly as it would be sent. To turn it off, set either variable on the container:
RUSTRAK_TELEMETRY=off # or DO_NOT_TRACK=1
One nice detail from the docs: any value other than on, off, true, false, 1 or 0 makes the server refuse to start, so a typo cannot silently leave telemetry running.
Setting 3: the MCP endpoint and its token
Rustrak has a built-in MCP endpoint at /mcp. MCP (Model Context Protocol) is the standard way AI assistants like Claude Code or Cursor connect to outside tools. With it on, your assistant can read and triage errors in the same session where it writes the fix.
It is off by default; until someone enables it, /mcp answers 404. Turn it on under Settings, AI assistants (MCP). The MCP guide shows the Claude Code setup:
claude mcp add --transport http rustrak https://your-rustrak.example.com/mcp \
--header "Authorization: Bearer your-40-char-token"
Two things deserve attention.
First, it can change things as well as read them. The guide lists 79 tools, including resolving and assigning issues and, for owners, destructive ones like deleting issues and revoking tokens. Destructive tools are flagged so clients that support it ask before running them. The assistant can do whatever the token's user can do. The guide says an API token can narrow that further, and an OAuth connection cannot. So create a dedicated, narrowed API token for the assistant rather than connecting as an owner.
Second, the guide includes a warning I wish more tools printed: "Error events are written by the applications you monitor, so their text can be anything, including instructions aimed at an assistant." That is prompt injection, where text that looks like data carries instructions. An attacker who can trigger an error in your app can choose the words in that error message. If your assistant reads errors and holds a token that can delete things, that is a real path. A narrow token makes it a dead end.
Honest limitations
The license is AGPL-3.0. Per LICENSING.md, Rustrak is "AGPL-3.0-only," except the @rustrak/client package, which is MIT. Running it internally is common practice under AGPL, but if you plan to modify it and offer it to others over a network, read the license or ask your legal team first.
It is young and maintained by a small team. Releases move fast, which is good for features and means you should pin an image version in production instead of latest.
It covers what Sentry's SDKs send. The AI page depends on your SDK's AI integration. The README names @sentry/node with the Vercel AI SDK as the verified path; if your agent framework does not emit those spans, the page will be thin.
No dollar figures. Token counts only, by design. You will do the cost math yourself.
The benchmark is the project's own. The 5,000-events-per-second figure is useful context, not a guarantee for your hardware.
Where this leaves you
Agent traces are turning into the most revealing record a team keeps: every prompt, every tool, every handoff. Rustrak makes it cheap to keep that record on your own machine with almost no code change.
The value comes from the three decisions you make on day one. Decide what the traces may contain. Decide whether the server may report home. Decide what the assistant reading those traces is allowed to touch. Make those three calls deliberately and Rustrak is a solid default for small teams running agents.
Sources: rustrak/rustrak README and LICENSING.md (main branch, v0.30.1, November 20, 2026); Rustrak telemetry docs; Rustrak MCP guide; Sentry Vercel AI integration docs.