Skip to main content

Django middleware client for sending unhandled exceptions to Bug Tracer

Project description

bug-tracer-client

bug-tracer-client is a reusable Django app that captures unhandled exceptions and sends them to a Bug Tracer backend.

Installation

pip install bug-tracer-client

Django setup

Add the app to INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    "bug_tracer_client",
]

Add the middleware after authentication middleware so authenticated user context can be included:

MIDDLEWARE = [
    # ...
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "bug_tracer_client.middleware.BugTracerMiddleware",
]

Set the single required setting:

BUG_TRACER_DSN = "bugtracer+https://PUBLIC_KEY@bug-tracer.example.com/1"

Supported DSN formats:

  • bugtracer+https://<public_key>@<host>[:<port>]/<project_id>
  • bugtracer+http://<public_key>@<host>[:<port>]/<project_id>

What it sends

The middleware sends a best-effort JSON payload containing:

  • exception type and message
  • stacktrace frames
  • request method and path
  • optional authenticated user info

Sensitive fields such as password, token, authorization, and cookie are redacted before sending.

Smoke check

from bug_tracer_client import __version__

print(__version__)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bug_tracer_client-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bug_tracer_client-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file bug_tracer_client-0.1.0.tar.gz.

File metadata

  • Download URL: bug_tracer_client-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for bug_tracer_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 887b5e6f552c838bce55c8635b32fabd3d1c1b0de0c9310f66ac6d6702a37cfd
MD5 05256b7f131f618b934331ff73bb2505
BLAKE2b-256 93aae9c853c26ab0d692f9d962844bea2848fc06e1cb50315942161ab0211ed4

See more details on using hashes here.

File details

Details for the file bug_tracer_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bug_tracer_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34b08ae738fcba6ea2d3fbb46bd10a390db7aceb6fa291d95ac385f4bc4c483f
MD5 62dc9292c361b842bb7f3685df878f3b
BLAKE2b-256 67a202b02170825afa6ce5aa93185bba49553754bbeb54df4488ac7fb90b2338

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page