hostme/request-id-bundle
Symfony bundle that assigns a unique request ID to every incoming HTTP request, propagates it through response headers and application logs, and makes it simple to correlate traces across distributed services for faster debugging and better observability.
Architecture fit — This is a Symfony bundle (*Bundle naming, Symfony DI/Kernel event listeners), not a Laravel package. Its value proposition — a correlation ID injected into every log record and propagated as an outbound HTTP header — is architecture-agnostic and genuinely useful in a microservice topology, but the delivery mechanism is Symfony-specific. Fit is therefore strong for Symfony/Kernel-based PHP services and poor-to-nonexistent for Laravel, where the container, middleware pipeline, logging channels, and HTTP client (Illuminate\Http\Client) are all different abstractions.
Integration feasibility — Low for Laravel. Consuming a Symfony bundle inside Laravel means pulling symfony/http-kernel, symfony/dependency-injection, and the Monolog bridge just to boot an event listener that Laravel would never dispatch. Realistically this is a pattern to copy, not a dependency to install. The equivalent Laravel implementation is ~80–120 lines: a global middleware that reads or mints X-Request-Id, Log::withContext(['request_id' => ...]), an Http::withHeaders() macro for outbound calls, and explicit context propagation into queued jobs. That is a one-to-two-day task with no third-party surface.
Technical risk — High relative to the value delivered:
Key questions
X-Request-Id values (length, charset, UUID format), or trust them blindly?Stack fit — Split the decision. Symfony services: install and pin, accept the bundle as a thin convenience. Laravel services: do not install; reimplement the pattern natively against Middleware, Log::withContext, Http::withHeaders, and queue payload decoration. A mixed estate should standardize on the contract (header name, format, propagation rules), not on this library.
Migration path — Treat the repo as a reference implementation. Read the listener and Monolog processor, port the semantics into a first-party Laravel package (~1 day), and own it. If you must adopt the bundle, fork it into your VCS, pin the commit, and add a PHP-version constraint test — you are now the maintainer, so budget accordingly.
Compatibility — Verify PHP 8.1+ support, Monolog 2 vs 3 processor API differences, and whether the outbound propagation hooks Guzzle, Symfony HttpClient, or both. Laravel's HTTP client wraps Guzzle, so a Guzzle middleware is portable even if the bundle's wiring is not. Confirm the ID appears in both daily and stderr channel formatters — line-based logs need the processor registered per channel.
Sequencing
X-Request-Id, or traceparent if you intend to graduate to W3C Trace Context), generation rules, and a trust policy for inbound values (accept only from your own edge, validate format, otherwise regenerate).Maintenance — Effectively zero upstream maintenance: no release in over two years, no dependents to surface regressions, bus factor of one. Any breakage is yours to fix. If adopted, add it to the fork-and-patch list and track the pinned commit in your dependency review.
Support — No community, no SLA, no documented security disclosure path. Internal support burden is low in absolute terms (the code surface is tiny) but concentrated in whoever owns observability.
Scaling — Runtime cost is negligible (one UUID and a few header writes per request). The real scaling concern is cardinality and retention: every log line grows, and request IDs are high-cardinality fields that index poorly in naive log stores. Budget for structured logging and a backend that handles high-cardinality dimensions. Value scales superlinearly with propagation coverage — a correlation ID that stops at one service is nearly worthless.
Failure modes
Ramp-up — Developer ramp-up is hours, not days: the concept is universally understood and the implementation is small. The actual cost is organizational — agreeing the header standard, the trust policy, and the propagation contract across teams. That governance work dominates the technical work and should be scheduled first.
How can I help you explore Laravel packages today?