--- id: flask-log-request-id version: "0.10.1" license: MIT license_treatment: permissive maintenance: dormant --- # Flask-Log-Request-ID — Flask extension that can parse and handle multiple types of request-id sent by request processors like Amazon ELB, Heroku or any multi-tier infrastructure as the one used for microservices. License: permissive · Maintenance: dormant · Downloads: 121.3K/mo ## What it is and what it does Flask-Log-Request-ID is a Flask extension that captures request IDs from HTTP headers (commonly set by load balancers like Amazon ELB or Heroku) and makes them available throughout your application's request lifecycle. It provides a RequestIDLogFilter that automatically injects the request ID into all log records, including those from third-party libraries, enabling you to trace a single user request across multiple services and log files. The package is designed for microservices and multi-tier infrastructure where a request passes through several layers. By attaching the same request ID to every log entry, you can correlate logs across services and dramatically simplify debugging. It exposes a current_request_id() function to retrieve the ID at any point in your code, and includes support for forwarding the request ID to Celery workers. Use it for: - Correlate logs across multiple Flask microservices by injecting a common request ID into all log records. - Debug production issues by tracing a single user request through multiple services using a unified request ID. - Forward request IDs to background Celery tasks so async work maintains the same tracing context. - Integrate with load balancer request tracing (ELB, Heroku) to preserve infrastructure-level request IDs in application logs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extracts request IDs from incoming HTTP requests (from load balancers or infrastructure) and injects them into Flask application logs for distributed tracing. Yes, with caution. The package is simple, stable, and solves a real problem in microservice logging. However, maintenance is dormant since 2019 with no recent commits—test compatibility with your Flask version before deploying to production. If you need active support or are using very recent Flask releases, consider whether a more actively maintained alternative exists. ## Install pip install flask-log-request-id uv add flask-log-request-id poetry add flask-log-request-id ## Installing Flask-Log-Request-ID Before you install: Low friction: single runtime dependency on Flask, pure Python wheel. Maintenance is dormant—last release October 2019, no commits since July 2024—but the package is stable and archived repository shows no active development planned. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install flask-log-request-id import logging from flask import Flask from flask_log_request_id import RequestID, RequestIDLogFilter app = Flask(__name__) RequestID(app) handler = logging.StreamHandler() handler.setFormatter(logging.Formatter("%(request_id)s - %(message)s")) handler.addFilter(RequestIDLogFilter()) logging.getLogger().addHandler(handler) Verify before relying: - Whether the package works correctly with modern Flask versions (3.0+) given the dormant maintenance status since 2019. - Compatibility with current Python versions and whether any undocumented breaking changes exist in recent Flask releases. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 121.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags request id logging flask, distributed tracing flask, request tracking logs, flask request correlation id, microservice request tracing, elb heroku request id, flask log context injection, microservices, request-tracing, logging [View on SkillFed](https://skillfed.io/packages/flask-log-request-id) · [View on PyPI](https://pypi.org/project/flask-log-request-id/)