Skip to main content

TraceGarden

TraceGarden

Developer-first visual backend devtools for Django, Flask, and FastAPI.

TraceGarden captures request timelines (DB + HTTP + spans + Celery) into local SQLite and serves a built-in UI at /__tracegarden.

Features

  • WSGI + ASGI support (Django, Flask, FastAPI)
  • OTel-native span ingestion into local TraceGarden UI
  • DB query fingerprinting, grouping, duplicate and N+1 detection
  • Outgoing HTTP inspector (requests / httpx)
  • Celery stitching (web request -> queued task -> worker state)
  • Trace bundle export (single JSON artifact)
  • Development guardrails: redaction by default + UI token protection

Installation

pip install tracegarden
# extras
pip install tracegarden[django]
pip install tracegarden[flask]
pip install tracegarden[fastapi]
pip install tracegarden[celery]

Quick Start

Django (one app + one middleware)

# settings.py
INSTALLED_APPS = [
    ...,
    "tracegarden.integrations.django",
]

MIDDLEWARE = [
    "tracegarden.integrations.django.middleware.TraceGardenMiddleware",
    ...,
]

TRACEGARDEN = {
    "enabled": True,
    "ui_token": "dev-secret",
    "ui_token_header": "X-TraceGarden-Token",
    "ui_prefix": "/__tracegarden",
}

# urls.py
from tracegarden.ui.routes import mount_django_urls
urlpatterns = mount_django_urls() + urlpatterns

Flask (init extension)

from flask import Flask
from tracegarden import TraceGarden

app = Flask(__name__)
TraceGarden(app, ui_token="dev-secret")

FastAPI (one middleware)

from fastapi import FastAPI
from tracegarden import TraceGarden

app = FastAPI()
TraceGarden(app, ui_token="dev-secret")

UI Access

Default route: /__tracegarden/

Pass token using one of:

  • header: X-TraceGarden-Token: dev-secret
  • query param: ?token=dev-secret
  • cookie: tg_token=dev-secret

Screenshots

Request list Request detail

OpenTelemetry

from tracegarden.otel.setup import setup_otel

setup_otel(
    service_name="my-api",
    also_export_to_tracegarden=True,
)

What gets recorded

See docs/WHAT_IT_RECORDS.md.

End-to-end examples

See examples/README.md.

License

MIT

Metadata

Release files for tracegarden 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracegarden 0.1.8
File Size Uploaded Provenance Actions
tracegarden-0.1.8.tar.gz 328.0 kB With provenance Details for tracegarden-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tracegarden 0.1.8
File Interpreter ABI Platform Actions
tracegarden-0.1.8-py3-none-any.whl Python 3 none any Details for tracegarden-0.1.8-py3-none-any.whl

Total release size: 379.1 kB

Release files / tracegarden-0.1.8.tar.gz

Download URL tracegarden-0.1.8.tar.gz
Size 328.0 kB
Tags Source
SHA-256 checksum
How to use checksums
42195ea0364203259786aa071f8d05b864bd3bebc2ad88ba81a02f2657fddec9
BLAKE2b-256 checksum
How to use checksums
6b1a00fca02cb4dd7a89311e194fbc1bb24680a1dd93073eb5c48b761fc7ee41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

Release files / tracegarden-0.1.8-py3-none-any.whl

Download URL tracegarden-0.1.8-py3-none-any.whl
Size 51.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52ef745ffbd26471902996ff6884510061c20f1900f2135f758b9954d7ac9627
BLAKE2b-256 checksum
How to use checksums
27c2f5baea5eec3a6b242e10e4225c8814c19c831dfa5e633be609687d560267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

Security for tracegarden 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tracegarden-0.1.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page