sbsedv/request-id-bundle
Symfony bundle that generates a unique request ID for each incoming request and propagates it through logs and responses, making it easier to trace errors and correlate activity across services. Configurable headers and ID generation support debugging in distributed applications.
What changed: v1.9.0 is a single-line compatibility release — it adds Symfony 8 support (PR #1, first external contribution to the repo). No new APIs, no deprecations, no behavioural changes are disclosed in the notes.
Architecture fit
SBSEDV/request-id-bundle is a Symfony bundle, not a Laravel package. Its value proposition is cross-cutting request correlation: generate/accept a request ID at kernel.request, attach it to the response, and expose it to Monolog via a processor so every log line in a request is traceable.Log::withContext(), response header) or bridge the bundle manually via a service provider. The package is only a direct fit if the estate is Symfony-based, or if the team is standardising correlation-ID semantics across mixed Symfony/Laravel services and wants one reference behaviour.Integration feasibility
composer require, enable in config/bundles.php, optionally configure header name/ID generator. No database migrations, no queues, no external services, no credentials.composer.json require block was widened (or narrowed) around symfony/*: ^8.0 and php: >=8.4. Whether Symfony 5.4/6.x constraints were retained or dropped is not visible in the release notes and is the single most important thing to verify — a "minor" release that silently drops Symfony 6.4 support would break downstream consumers on the next composer update.Technical risk
^1.9 constraint is reasonable once verification is done.composer.json between 1.8.1 and 1.9.0. Verify both directions — that Symfony 8 is added and that older majors are still permitted if any of your services remain on 6.4/7.x.X-Request-Id header. If inbound values are not validated (length, charset), you get log injection and attacker-controlled correlation IDs that poison tracing. Validate this behaviour on your own terms regardless of version.Key questions to answer before adopting or upgrading
Stack fit
HandleRequestId) plus Log::withContext(['request_id' => $id]) and a response header — roughly a day of work — rather than trying to bend a Symfony bundle into the framework. Treat the package as a spec, not a dependency.Migration path
^1.8.1 and let the resolver pick 1.9.0 once the constraint diff is reviewed.Compatibility
Sequencing
composer.json diff for 1.8.1 → 1.9.0; record the constraint and PHP floor.^1.8.1 in all services immediately (protects against a future 1.9.x that drops older Symfony).^1.8.1 to ^1.9 across the estate.Maintenance
Support
composer require failing on constraint resolution can block a build, which is the realistic incident scenario here.Scaling
request_id to every log line materially increases log index cardinality and storage in Splunk/Datadog/ELK. Validate retention and indexing policy before broad rollout, and confirm the ID is not used as a high-cardinality APM metric tag.Failure modes
composer update in an unrelated service, if 1.9.x later narrows Symfony support. Pinning to ^1.8.1 mitigates.Ramp-up
Recommendation: Adopt/pin ^1.8.1 now and evaluate 1.9.0 as a Symfony 8 enabler. Before widening constraints, verify the composer.json diff (Symfony constraint widening vs replacement, PHP floor) and confirm inbound-ID validation. For Laravel services, implement the pattern natively rather than integrating the bundle.
How can I help you explore Laravel packages today?