Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Xrequestuid Bundle Laravel Package

m6web/xrequestuid-bundle

A Symfony bundle that assigns a unique ID to each incoming request and exposes it via the X-Request-Uid header, making it easy to correlate logs and trace requests across services. Lightweight, simple to install, and works with Symfony's request/response cycle.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is mis-scoped against the stated target: m6web/xrequestuid-bundle is a Symfony bundle, not a Laravel package. It hooks Symfony's kernel.request/kernel.response events and its DI Extension/Configuration tree to generate a request UID and attach it to the request, the Monolog record, and outbound HTTP calls. Laravel has no bundle system, no kernel.* events, and a different container/config model. Architecturally there is no seam to plug into — adoption is not "install and configure," it is "port the concept."

Integration feasibility. Low. There is no ServiceProvider, no Laravel-facing config, no published contract beyond an HTTP header name. What the package actually does is small and well-understood: read-or-generate an ID, store it on the request, push it into log context, forward it on downstream calls. That is roughly a middleware plus a log-context tap plus an Http/Guzzle header in Laravel — on the order of 150–250 lines. We would be adopting a dead dependency to avoid writing a small amount of first-party code, and paying a compatibility shim for the privilege.

Technical risk. High across every axis:

  • Abandonment — explicitly marked DEPRECATED, repository archived, last release 2020-01-30. No security response, no PHP 8.x/Symfony 6+ guarantees, no advisory channel.
  • Compatibility — 2020-era composer.json constraints will likely conflict with Laravel 10/11's PHP 8.1+ and Symfony 6/7 transitive requirements. Expect to fork-and-patch before anything installs.
  • Validation — 3 stars, 0 dependents, score 0.0375. There is no production evidence to borrow and no community to escalate to.
  • Obsolescence of the concept — request-ID correlation is now table stakes and standardized: W3C traceparent, OpenTelemetry, and Laravel's own Context facade all solve this with maintained, interoperable implementations. Adopting a bespoke 2020 header convention risks a private correlation scheme we cannot federate with APM tooling later.

Key questions.

  1. Is the actual requirement log correlation (simple UID) or distributed tracing (span context, sampling, propagation semantics)? These lead to very different builds.
  2. Do we need W3C Trace Context interop with an APM vendor (Datadog, Sentry, Honeycomb, OTel Collector) now or within 12 months?
  3. What are the concrete PHP/Laravel/Symfony versions across the estate, and is there any Symfony service where this bundle would be a legitimate drop-in?
  4. Where is the trust boundary — do we accept an inbound X-Request-Uid from external clients, or only from trusted internal hops?
  5. Who owns this code in 18 months if we fork it?

Integration Approach

Stack fit. Poor as a dependency, good as a reference implementation. The value is the behavior specification, not the artifact. Recommended posture: treat the repo as documentation, implement natively.

Migration path. For a Laravel target:

  1. Extract the contract from the repo — header name, generation strategy (UUIDv4 vs random hex), trust rules for inbound values, log field name, outbound propagation points.
  2. Implement a RequestUid middleware: accept a trusted inbound header, else generate; bind to the request and to Log::withContext() / Context::add().
  3. Add outbound propagation via Http::withHeaders() in a shared client factory or a global Guzzle middleware.
  4. Extend to queued jobs (JobProcessing/JobProcessed listeners) and console commands — the original bundle's weak spot and the most common source of broken trace chains.
  5. If a Symfony service genuinely needs it, prefer Symfony's native request/response header handling or a maintained alternative; do not onboard an archived bundle into a new service.

Compatibility. Expect failure before success: audit the archived composer.json for PHP and symfony/* constraints against the target application. A fork is the realistic path if adoption is mandated — pin the fork, vendor it or use a VCS repository entry, and own the maintenance burden explicitly.

Sequencing. Do the contract first (header name and trust boundary are the hard, cross-team, hard-to-change decisions), then inbound generation, then log binding, then outbound propagation, then async/queue propagation, then dashboards and alerts. Ship the first three steps as a single small release so correlation is visible end-to-end before expanding scope. If OTel is on the roadmap within two quarters, skip steps 4–5 and adopt traceparent semantics up front rather than layering a second scheme we will have to retire.

Operational Impact

Maintenance. Zero upstream. Archived means we inherit the whole codebase the moment we fork it, and a fork of a deprecated 2020 bundle is a permanent line item with no external contributor base. The counterfactual — first-party middleware of ~200 lines against stable framework APIs — is materially cheaper to own over a 3-year horizon.

Support. No maintainer, no CVE process, no issue triage, no upgrade path. An archived repository will not receive advisories; if a vulnerability lands in a transitive dependency, we find out from our own scanning, not from the project. This is a governance finding, not just a technical one, and should be recorded as an explicit accepted risk if anyone overrides the recommendation.

Scaling. The runtime cost is negligible — a UUID per request is free. The real scaling cost is log and metric cardinality: a per-request field multiplies index/storage volume across every service and every log line, and high-cardinality correlation IDs blow up observability spend if indexed naively. Decide up front whether the ID is indexed, sampled, or stored-but-unindexed, and budget the log-volume delta before rollout.

Failure modes.

  • Missing inbound header (client or hop doesn't send it) → trace silently restarts mid-path; looks fine in logs, useless in an incident.
  • Spoofed header (external client sets the value) → log injection / correlation poisoning, and an attacker-controlled string in our log pipeline. Trust boundary must be explicit and enforced at the edge.
  • Async propagation gap → queue workers, scheduled jobs, and console commands fall outside the chain; the traces that matter most during incidents are the ones that break.
  • Format drift across services (casing, UUID vs hex, header name variants) → partial correlation that appears to work in dev and fragments in prod.
  • Framework upgrade → fork breaks silently on a Laravel/PHP bump; no upstream to fix it, and no test suite from the project to catch the regression.

Ramp-up. Technically trivial — an engineer understands the middleware in an hour. The organizational risk is the opposite: nobody joining later will know the dependency is archived, and "it works today" hides a shrinking support envelope. Mitigate with an ADR that records the decision, the fork's owner, and the trigger conditions for replacing it with OpenTelemetry.

Recommendation. Do not adopt. Score 0.0375 is consistent with the evidence: deprecated, archived, unmaintained since 2020, no dependents, wrong framework. Reimplement the behavior as first-party Laravel middleware (or adopt OpenTelemetry if distributed tracing is in scope) and cite this repo as the design reference only.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle