$npx skillfedfor your agent

asgi-correlation-id

Middleware correlating project logs to individual requests

Worth itPyPI Software DevelopmentReleased Jun 20266.9M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — asgi_correlation_id-5.0.1-py3-none-any.whl
v5.0.1 · released 2026-06-09 · Python >=3.10 · 1 runtime deps: starlette

Yes. The package is production-stable (Development Status 5), has no known vulnerabilities, minimal dependencies, and solves a common observability problem in ASGI applications. Install it if you need to correlate logs across your application; the setup overhead is low and the debugging value is high.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; logging must be configured separately to include correlation_id in the format string.
  • Low friction: pure Python wheel with a single runtime dependency on starlette.
  • Actively maintained with recent releases; last commit 2026-06-09 and 638 repository stars indicate steady adoption and support.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.

last release 2026-06-09 (66 days) · last repo commit 2026-06-09 · 638 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,892,349 downloads/mo, #1,818 on PyPI

Verify before relying

pip install asgi-correlation-id

from asgi_correlation_id import CorrelationIdMiddleware
from starlette.applications import Starlette

app = Starlette()
app.add_middleware(CorrelationIdMiddleware)

# Configure logging to include %(correlation_id)s in format string
  • Performance overhead of correlation ID generation and storage per request under high throughput.
  • Compatibility with async context propagation in complex middleware stacks beyond Starlette.
  • Whether correlation IDs propagate correctly through background tasks or worker processes.
Same gist for agents: .md · .json

What it is and what it does

This package provides ASGI middleware that attaches a unique correlation ID to each incoming HTTP request, either by reading an existing ID from a header (like X-Request-ID or X-Correlation-ID) or by generating a new one. The middleware stores this ID in a way that makes it accessible to your application's logging system, allowing you to tag all log messages from a single request with the same ID.

The primary use case is request tracing: when logs from different parts of your application are all tagged with the same correlation ID, you can easily retrieve and correlate all logs belonging to a single user request. The package integrates with Python's standard logging module via a filter and supports customization of header names, ID generation, validation, and transformation.

Use it for

  • Debugging production issues by filtering logs to show only those from a specific user request.
  • Tracing requests across multiple services when correlation IDs are propagated through HTTP headers.
  • Integrating with error tracking services to group errors by the request that triggered them.
  • Auditing and compliance logging where you need to track all actions during a specific request.
  • Correlating logs from multiple handlers or middleware layers processing the same incoming request.

Worth the install?

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

Worth it

Yes.

The package is production-stable (Development Status 5), has no known vulnerabilities, minimal dependencies, and solves a common observability problem in ASGI applications. Install it if you need to correlate logs across your application; the setup overhead is low and the debugging value is high.

Install

asgi-correlation-id on PyPI

Before you install

Low friction: pure Python wheel with a single runtime dependency on starlette. Actively maintained with recent releases; last commit 2026-06-09 and 638 repository stars indicate steady adoption and support.

Requires Python 3.10 or later; logging must be configured separately to include correlation_id in the format string.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install asgi-correlation-id

from asgi_correlation_id import CorrelationIdMiddleware
from starlette.applications import Starlette

app = Starlette()
app.add_middleware(CorrelationIdMiddleware)

# Configure logging to include %(correlation_id)s in format string

Verify before relying

  • Performance overhead of correlation ID generation and storage per request under high throughput.
  • Compatibility with async context propagation in complex middleware stacks beyond Starlette.
  • Whether correlation IDs propagate correctly through background tasks or worker processes.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
starlette
MaintenanceActively maintained 66 days since the last release
Last repo commit
First released
Downloads6,892,349 / month, #1,818 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules

Evidence: asgi_correlation_id-5.0.1-py3-none-any.whl

Tags

Capabilities
asgi correlation id middlewarerequest tracing loggingcorrelation id header middlewarestarlette request trackinghttp request id loggingdistributed request tracingx-request-id middleware
Topics
observabilityrequest-tracinglogging-integration
PyPI keywords
asgifastapistarletteasynccorrelationcorrelation-idrequest-idx-request-idtracingloggingmiddlewaresentry

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 › “asgi correlation id middleware”

  • asgi-correlation-idASGI middleware that reads or generates correlation IDs for incoming…
  • django-guidAttaches a unique correlation ID to all logs for every Django…
  • django-cidAssigns unique correlation IDs to incoming HTTP requests and…

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

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also django-guid · starlette-context · flask-request-id-header · django-cid · timing-asgi · django-request-id · django-log-request-id · opentelemetry-instrumentation-asgi · asgi-csrf · brotli-asgi