Skip to main content

django-tracepanel

CI PyPI Python Django

See what your Django app is really doing. Tracepanel records each request, Celery task and management command of your Django app with its SQL queries, cache calls, Redis commands, outgoing HTTP calls, templates, signals, emails, logs and errors. It points out N+1 queries and calls, duplicates, slow SQL and slow HTTP calls, and long transactions, and names the line of code to fix.

A 40-second demo: Swagger UI's Try it out on an endpoint, and the panel docked under it with the request's call tree, an N+1 with its query plan, a background task, its profile, and the same call after the fix

▶ Watch the 40-second demo

Works with

Supported
Python and Django Django 5.2 on Python 3.11 to 3.14, Django 6.0 on 3.12 to 3.14, Django 6.1 on 3.12 to 3.15. Each pair is tested in CI.
Django Views, sync and async, under runserver or any WSGI or ASGI server. Templates, Django's and Jinja2. Cache, signals, email, logins, file storages, collectstatic, management commands, migrate, system checks.
Databases PostgreSQL, MySQL, SQLite, SQL Server and Oracle, through the ORM or a driver directly. EXPLAIN on all but Oracle. SQLAlchemy and MongoDB.
APIs Django REST framework, Django Ninja, Graphene, Strawberry, htmx.
Background work Celery, Dramatiq, RQ, Huey, django-q2, Taskiq, Django Tasks, Channels.
Clients requests and urllib3, httpx, aiohttp, Redis and Valkey, AWS through boto3 and aiobotocore, the OpenAI and Anthropic SDKs. Spans from OpenTelemetry instrumentations join the trace.
Profiling Where a request's or a task's time goes, and its memory when you ask for it.
Tests pytest --tracepanel fails a test that makes an N+1 or duplicate queries.

The drivers, the versions of each library and the settings are in the Django guide.

This package has no code of its own. It installs tracepanel with Django support, the same as pip install "tracepanel[django]".

pip install django-tracepanel

Setup

Add the app to your settings. It is on whenever DEBUG = True.

# settings.py
INSTALLED_APPS += ["tracepanel.django"]

To leave the settings as they are, start the server through tracepanel run instead. It turns Tracepanel on even with DEBUG = False.

tracepanel run python manage.py runserver

Open any page and click the badge in the corner to open the panel. The console is at /__tracepanel__/.

What it looks like

Each request shows its call tree, with the SQL queries, the calls and the issues in it:

Swagger UI's endpoint run with Try it out and the start of its 200 response, and the panel docked under it with the same request's call tree and its two N+1 queries

The panel also lists the requests your pages and tools make with fetch(), here Swagger UI's Try it out. Each issue comes with its fix in Django's terms, such as the select_related() that removes an N+1:

Swagger UI's endpoint run with Try it out, and the panel docked under it on that request's Issues tab: each N+1 with where it comes from and the fix

The console shows every endpoint over time, with the slowest and the failing ones:

The console's HTTP page: requests and latency over time, the slowest and the failing endpoints

Work outside a request, such as Celery tasks, has its own pages:

The console's Tasks page: runs and latency over time, the slowest and the failing tasks

Documentation

The Django guide is at tracepanel.dev/docs/django: what Tracepanel records in Django, its settings, workers and commands. The panel, the console and the issues are the same in every framework, under tracepanel.dev/docs.

License

Licensed under the MIT License.

Metadata

Release files for django-tracepanel 0.14.0

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

Source distribution (sdist)

Source distribution for django-tracepanel 0.14.0
File Size Uploaded Provenance Actions
django_tracepanel-0.14.0.tar.gz 4.1 kB With provenance Details for django_tracepanel-0.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-tracepanel 0.14.0
File Interpreter ABI Platform Actions
django_tracepanel-0.14.0-py3-none-any.whl Python 3 none any Details for django_tracepanel-0.14.0-py3-none-any.whl

Total release size: 8.1 kB

Release files / django_tracepanel-0.14.0.tar.gz

Download URL django_tracepanel-0.14.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
045e47f8744a650e6728649664e0311cbcbe10b01b84088dcd04b4637c5e67bb
BLAKE2b-256 checksum
How to use checksums
3ea321e801f78cbc39bb95fe2ab7e307e6b5fed3cb151c6de9e58fc861a18feb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Nov 4, 2026.

Transparency log

Release files / django_tracepanel-0.14.0-py3-none-any.whl

Download URL django_tracepanel-0.14.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af1ea63bde32c38169bc3d6dfefd309cadd1983bef27eaaccde83af0f15de845
BLAKE2b-256 checksum
How to use checksums
a04f005a1d2de341d0f46e6ba5ee72990d336dead90873be4fec0e9c20c72d5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Nov 4, 2026.

Transparency log

Security for django-tracepanel 0.14.0

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 django_tracepanel-0.14.0.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 Nov 4, 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