$npx skillfedfor your agent

django-cid

Correlation IDs in Django for debugging requests

With conditionsPyPI MonitoringReleased May 2024129.3K downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_cid-3.0-py3-none-any.whl
v3.0 · released 2024-05-14 · Python >=3.8 · 1 runtime deps: django

Yes, if you use Django and need request tracing for debugging. The package is stable, has low install friction, and solves a real problem in multi-request logging scenarios. The dormant maintenance status is acceptable for a mature, feature-complete tool—no active vulnerabilities and it supports current Django and Python versions. Install it if request correlation is important to your logging strategy.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django >= 3.1 and Python >= 3.8.
  • Low install friction with a single runtime dependency on django.
  • Maintenance is dormant—no releases since May 2024, though the repository remains active and the package is marked Production/Stable.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause is a permissive open-source license. You may use, modify, and distribute this package freely in commercial and private projects, provided you include the license text and do not hold the authors liable.

last release 2024-05-14 (822 days) · last repo commit 2024-05-14 · 46 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 129,263 downloads/mo, #11,676 on PyPI

Verify before relying

pip install django-cid

# In Django settings.py, add to MIDDLEWARE:
MIDDLEWARE = [
    'django_cid.middleware.CIDMiddleware',
    # ...
]

# Correlation ID is then available in logs and can be accessed via:
from django_cid import get_cid
cid = get_cid()
  • Whether the package works with Django versions beyond 4.2 (latest tested version in classifiers).
  • Performance impact of automatic SQL query annotation on high-throughput applications.
  • Compatibility with async Django views and middleware.
Same gist for agents: .md · .json

What it is and what it does

Django Correlation ID is a middleware package that assigns a unique identifier to each incoming HTTP request and propagates it through the Django request/response cycle. This correlation ID can be automatically embedded in all log messages, SQL query comments, rendered templates, and HTTP response headers, making it easy to trace which log entries belong to the same request when debugging multi-request scenarios.

The package solves the problem of log attribution in complex systems where multiple requests are processed concurrently. Instead of manually threading request IDs through your codebase, django-cid handles this automatically via middleware, allowing you to correlate all side effects of a single request without explicit plumbing. It's particularly useful in service-oriented architectures where you need to pass the correlation ID to downstream services.

Use it for

  • Trace all log messages belonging to a single user request across multiple application components and services.
  • Debug production issues by filtering logs by correlation ID to isolate the request that caused a problem.
  • Include correlation IDs in SQL query comments to link database activity to specific HTTP requests.
  • Pass correlation IDs to downstream microservices via HTTP headers to maintain request tracing across service boundaries.
  • Render correlation IDs in error pages or response headers for customer support reference.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use Django and need request tracing for debugging.

The package is stable, has low install friction, and solves a real problem in multi-request logging scenarios. The dormant maintenance status is acceptable for a mature, feature-complete tool—no active vulnerabilities and it supports current Django and Python versions. Install it if request correlation is important to your logging strategy.

Install

django-cid on PyPI

Before you install

Low install friction with a single runtime dependency on django. Maintenance is dormant—no releases since May 2024, though the repository remains active and the package is marked Production/Stable. Suitable for stable projects that don't require frequent updates.

Requires Django >= 3.1 and Python >= 3.8.

License in practice

BSD-3-Clause is a permissive open-source license. You may use, modify, and distribute this package freely in commercial and private projects, provided you include the license text and do not hold the authors liable.

Quickstart

pip install django-cid

# In Django settings.py, add to MIDDLEWARE:
MIDDLEWARE = [
    'django_cid.middleware.CIDMiddleware',
    # ...
]

# Correlation ID is then available in logs and can be accessed via:
from django_cid import get_cid
cid = get_cid()

Verify before relying

  • Whether the package works with Django versions beyond 4.2 (latest tested version in classifiers).
  • Performance impact of automatic SQL query annotation on high-throughput applications.
  • Compatibility with async Django views and middleware.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
django
MaintenanceDormant 822 days since the last release
Last repo commit
First released
Downloads129,263 / month, #11,676 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 3Framework :: Django :: 3.1Framework :: Django :: 3.2Framework :: Django :: 4Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: django_cid-3.0-py3-none-any.whl

Tags

Capabilities
django request correlation idrequest tracing loggingdjango request id trackingcorrelation id middlewaretrace requests across logsdjango debugging request flowrequest lifecycle tracking
Topics
request-tracingdjango-middlewarelogging-instrumentation
PyPI keywords
djangologgingcorrelationiddebugging

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django request correlation id”

  • django-cidAssigns unique correlation IDs to incoming HTTP requests and…
  • django-guidAttaches a unique correlation ID to all logs for every Django…
  • django-request-idAttaches a unique request ID to each Django HTTP request and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Monitoring packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
opentelemetry-semantic-conventions Worth it
PyPI · Monitoring · released Jul 2026

Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.

Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.

Apache-2.0pure Python · 3.10+
542.9Mdownloads / mo
opentelemetry-sdk Worth it
PyPI · Monitoring · released Jul 2026

Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.

Apache-2.0pure Python · 3.10+
521.8Mdownloads / mo
opentelemetry-api With conditions
PyPI · Monitoring · released Jul 2026

Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.

Apache-2.0pure Python · 3.10+
463.8Mdownloads / mo
opentelemetry-exporter-otlp-proto-http Worth it
PyPI · Monitoring · released Jul 2026

Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.

Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.

Apache-2.0pure Python · 3.10+
409.9Mdownloads / mo
opentelemetry-instrumentation Worth it
PyPI · Monitoring · released Jul 2026

Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.

Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.

Apache-2.0pure Python · 3.10+
393.5Mdownloads / mo

See also django-guid · asgi-correlation-id · django-queryinspect · django-log-request-id · django-request-logging · Flask-Log-Request-ID · eliot · django-dirtyfields · django-cors-headers · opencensus-ext-logging