Data Retention for Self-Hosted Error Tracking

Control the lifecycle of every error report

Retention policies, artifact cleanup, sensitive data scrubbing, ingest protection, and offline operation. Keep production debugging data on your server for only as long as it is useful.

Control data retention policies on your own Telebugs server

Retention policies and automatic purging keep your error data under your control for as long (or as short) as you need.

Quick answer: what should error data retention cover?

Error data retention should cover the full debugging lifecycle: incoming reports, stack traces, breadcrumbs, request context, user context, extras, notes, releases, source maps, attachments, background jobs, and maintenance cleanup. The goal is to keep enough data to fix production bugs while avoiding indefinite storage of sensitive or stale debugging context.

Telebugs keeps that lifecycle on your own infrastructure. You can configure retention policies, let scheduled cleanup jobs purge old data, manage error and artifact retention through the REST API, scrub sensitive values before storage, and use ingest protection when an error storm threatens queue, database, or disk health.

Why retention control matters

Error data often contains sensitive information: request payloads, user IDs, session details, stack traces with application logic, and sometimes personal data. Keeping it forever increases your attack surface, storage costs, and compliance burden.

At the same time, you may need different retention for different projects. A customer-facing production app might need 90 days for debugging and support. An internal tool or staging environment might be fine with 30 days or less. Regulated industries often have strict maximums.

Self-hosted tools give you direct control over where error data lives, who can access it, how long it remains useful, and when it should disappear. Telebugs makes that control part of the product instead of a separate operations project.

How Telebugs handles retention and purging

You control retention policies for error data and artifacts. Telebugs runs background jobs that clean up old data according to those policies, and recent releases added API access and maintenance visibility around this lifecycle.

Data Why it matters Telebugs control
Error reports Stack traces, messages, breadcrumbs, request data, user context, tags, and extras are useful for debugging but should not live forever. Error retention policy and scheduled purging.
Artifacts Source maps and release artifacts make production traces readable, but they also consume disk. Artifact retention policy, purge jobs, and API access.
Background work Completed jobs and maintenance records should not grow without bounds. Background job cleanup and Maintenance Activity pruning.
Error storms A bad deploy can produce more incoming work than a small server should accept. Accepted-errors-per-minute, queue, and low-disk ingest protection.

Releases and source maps are tied into the same data lifecycle. For the debugging side of those artifacts, see releases and source maps.

Compliance and privacy angles

Retention controls do not make any tool magically "compliant." They give your team technical controls that can support a compliance program: choosing where data lives, limiting what gets stored, deleting old records, documenting cleanup behavior, and keeping production debugging data inside your own boundary.

Concern Why error tracking is involved Telebugs helps by
Data minimisation Error reports can include request data, user identifiers, tokens, and application context. Keeping the product focused on error tracking and scrubbing common sensitive values before storage.
Storage limitation Debugging data is often useful for weeks or months, not forever. Letting you set retention periods for errors and artifacts, then purge old data automatically.
Right-to-erasure workflows A user's identifier or request context may appear inside error reports. Providing REST API access so teams can build workflows around their internal request process.
Data residency Hosted error tracking may move error data to a third-party vendor or region. Running on infrastructure you choose, including private networks, EU infrastructure, or on-prem environments.
Internal security policy Debug data can expose application behavior and customer-impacting incidents. Keeping access, backups, firewall rules, retention, and AI/MCP access under your administration.

The UK ICO's GDPR guidance lists data minimisation and storage limitation among the core data protection principles. Telebugs gives engineering teams practical controls that can support those principles, but your legal obligations depend on your jurisdiction, data, contracts, and internal policies.

Sensitive data scrubbing

The best retention policy is still helped by collecting less sensitive data in the first place. Telebugs includes server-side sensitive data scrubbing for common secrets such as passwords, credit cards, API keys, and tokens before reports are stored in the database.

This matters because error payloads come from real production paths. A bad request, malformed webhook, or third-party SDK can send more context than intended. Scrubbing reduces the chance that common secrets become part of long-lived debugging history.

Scrubbing is not a substitute for careful SDK configuration. You should still use Sentry SDK scrubbing hooks where appropriate, avoid sending unnecessary user data, and review what your applications attach to exceptions.

Practical examples

A team sets a 90-day error retention policy. Scheduled cleanup keeps detailed reports from growing indefinitely, while dashboards still provide enough recent context for debugging and support.

A company with strict data residency rules installs Telebugs in its chosen region or private network. Error data, source maps, notes, and AI/MCP access stay inside the infrastructure the company administers.

A privacy team wants retention policies managed from internal tooling. Telebugs exposes retention policies for errors and artifacts through the REST API, so policy automation can live alongside the rest of the governance workflow.

curl https://your-telebugs-instance.com/api/telebugs/v1/data_retention/errors \
  -X PATCH \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"retention_period_days": 30, "time_based_enabled": true}'

A small team on cheap VPS hardware uses short retention (30-60 days) so their SQLite database and disk usage stay small even as they ship new features and see normal error volume.

Another team has one noisy endpoint that starts throwing thousands of errors per minute. Ingest Protection caps what Telebugs accepts, pauses when too many errors are queued or disk space is low, and gives the team room to fix the application without the error tracker becoming the next thing to rescue.

Retention checklist for error tracking

A practical retention policy should answer a few concrete questions:

  • How long do engineers need detailed reports? Choose a window that supports real debugging, support, and incident review.
  • Do staging and production need different windows? Lower-risk environments often need shorter retention.
  • How long should source maps and artifacts remain? Keep them long enough to debug deployed versions that users can still hit.
  • What data should never be stored? Use SDK filtering and server-side scrubbing to reduce sensitive payloads before retention becomes relevant.
  • What happens during an error storm? Configure accepted-error, queue, and disk limits so retention cleanup is not your only defense.
  • Who can change retention settings? Treat retention as an admin-level control and include it in operational review.

When this matters most

If privacy, compliance, or cost/storage control are real constraints for your team, retention policies with automatic purging on self-hosted infrastructure are one of the clearest advantages over hosted error tracking services.

Teams that are already self-hosting for data residency reasons get the benefit without routing production debugging data through another vendor. Teams that are cost-sensitive appreciate that shorter retention directly reduces disk pressure, especially on low-resource error tracking setups.

Everything is included with the standard one-time purchase. There are no retention tiers or enterprise data-control upsells.

Comparison to self-hosted Sentry

Self-hosted Sentry also gives teams control over their own deployment, but the retention and storage story lives inside a much larger platform. You are operating a broad stack with more services, queues, storage behavior, and upgrade surface.

Telebugs keeps retention logic inside focused error tracking. The shape is deliberately simple: configure error and artifact retention, let cleanup jobs run, use the API when you need automation, and rely on ingest protection when incoming volume threatens the instance. This matches the overall philosophy of maintainable self-hosted error tracking rather than a full observability platform.

For the broader hosting decision, see Telebugs vs self-hosted Sentry. If privacy is your main driver, pair this page with privacy-first error tracking.

Frequently asked questions

What is error data retention?

Error data retention is the policy for how long detailed debugging records should remain available. In error tracking, that usually includes reports, stack traces, breadcrumbs, request context, user context, tags, extras, notes, releases, source maps, and related artifacts.

Can I set a custom retention period?

Yes. You configure how long error data should be kept, and Telebugs automatically purges older data according to that policy. Telebugs also exposes retention policies for errors and artifacts through the REST API.

What exactly gets deleted?

Detailed reports and associated debugging context are removed according to the configured policy. Artifact retention covers related files such as source maps. Some summarized metadata may remain where the application needs it for aggregate views or operational history.

Does Telebugs retain source maps and artifacts forever?

No. Artifacts have their own retention policy. That matters for JavaScript and TypeScript teams because source maps are useful for debugging production releases, but they should still be part of your storage lifecycle.

Does Telebugs scrub sensitive data?

Yes. Telebugs includes server-side scrubbing for common sensitive values such as passwords, credit cards, API keys, and tokens before reports are stored. You should still configure your SDKs to avoid sending unnecessary sensitive data.

Can I manage retention through an API?

Yes. The Telebugs REST API includes data retention policies for both errors and artifacts, so teams can automate retention settings from internal tooling.

Does offline mode affect retention?

No. Retention and purging jobs run locally on your Telebugs instance regardless of whether the server has outbound internet access. The entire system is designed to operate fully offline.

What happens during an error storm?

Ingest Protection lets you set accepted-errors-per-minute, queued-error, and free-disk limits. Once a limit is reached, Telebugs returns 429 for excess incoming errors before writing them to the ingest queue.

How can retention help with GDPR?

GDPR programs often need practical controls for data minimisation, storage limitation, security, and deletion workflows. Self-hosting, retention policies, automatic purging, and sensitive data scrubbing can support those goals, but your compliance obligations depend on your specific situation.

No. Telebugs provides technical controls for self-hosted error data, retention, scrubbing, and access. Your team should decide policies with the people responsible for legal, security, and privacy requirements.

Ready to own your error data lifecycle?

Review security and trust, installation expectations, and pricing. For hands-on evaluation, request a private demo.