m6web/statsd-request-headers-bundle
A Symfony bundle that emits StatsD metrics for incoming HTTP request headers, so you can track header presence, sizes, and distributions across your application. It hooks into the m6web StatsD ecosystem to instrument requests with minimal configuration.
Architecture fit: Still low for direct adoption. Despite being listed as a Laravel/PHP package, m6web/statsd-request-headers-bundle is a Symfony Bundle, not a Laravel package. It assumes Symfony’s HttpKernel/EventDispatcher/DI patterns, so it does not fit Laravel’s middleware and service-container model without a bridge or port. v1.1.0 does not change this: the release enriches the emitted event with route and operation names, which are sourced from Symfony routing/request attributes and do not map one-to-one onto Laravel’s route/controller naming. Treat it as a reference implementation for “record selected request headers plus route/operation context into StatsD,” not as a dependency.
Integration feasibility: Direct Composer integration into a Laravel app remains unlikely to be worthwhile. Laravel would not auto-register the Symfony bundle, and the package’s Symfony-version assumptions are from the 2016 era. The v1.1.0 change is small and additive (metric enrichment), so it does not create a migration argument. Feasible path is unchanged: reimplement as Laravel middleware using a maintained StatsD client, and adopt the route/operation naming idea natively. Effort is small if only allowlisted header presence/values plus bounded route/action tags are emitted; larger if the team attempts to preserve Symfony bundle semantics.
Technical risk: Remains high. A single minor release with a one-line note (“Optimise event (add route and optim names)”) is not evidence of renewed maintenance: no changelog detail, no compatibility statement, no test/version matrix signal, and historically 0 stars/0 dependents and a 2016-era codebase. The TPM should explicitly check whether the repository is still archived and whether this is a one-off commit rather than a maintained roadmap. The main product risk is still observability design, and v1.1.0 slightly widens it: route and operation names are lower-cardinality than raw headers, but Laravel route names can be null (unnamed routes), and operation/controller names can drift across refactors, creating tag churn and dashboard breakage. Header values remain the dominant risk (secrets, PII, unbounded values, high-cardinality identifiers).
Key questions:
Stack fit: Poor as a package dependency; acceptable as a design reference. Laravel’s natural integration point is HTTP middleware that reads request headers (and resolved route metadata) and emits StatsD metrics. The Symfony bundle’s event-subscriber approach does not map cleanly to Laravel without custom glue, and v1.1.0’s route/operation enrichment is tied to Symfony request attributes rather than Laravel’s router.
Migration path: Do not install the Symfony bundle into Laravel. Instead:
unnamed), and avoid raw paths/URIs as tags.Compatibility: Assume the original package targets older Symfony/PHP conventions and may not install or run cleanly on modern Laravel. v1.1.0 adds no compatibility evidence. Any direct-use attempt should be time-boxed as a spike only. The real compatibility target is the team’s Laravel version, PHP version, StatsD client, metrics backend, and existing naming taxonomy for routes/actions.
Sequencing: Start with privacy/security review and cardinality design before coding — v1.1.0 makes the naming/tagging design part of that review. Then build a thin middleware spike (headers + route/operation tags), test in staging with sampling enabled, compare metric volume and utility, and roll out behind configuration. Keep the Symfony bundle out of the runtime dependency graph unless a proven bridge is required.
Maintenance: Upstream maintenance is effectively unproven: a single v1.1.0 release with minimal notes does not offset the archived/2016 legacy signal, and there is no dependents or roadmap evidence. Any direct dependency becomes team-owned immediately. A Laravel middleware port is also team-owned but is smaller, clearer, and aligned with the application stack — and lets us own the route/operation tag semantics instead of inheriting Symfony’s.
Support: No active community or vendor support signal; v1.1.0 does not establish a support channel. Internal documentation should be mandatory. The TPM should assume questions will be answered by the implementing team, not upstream.
Scaling: StatsD scaling risk is driven by cardinality, not request volume alone. Raw User-Agent, X-Request-ID, Authorization, cookies, and custom correlation headers can overwhelm the metrics backend. v1.1.0’s route/operation tags are generally safer but not free: unnamed routes, parameterized paths, and refactored controller names can multiply tag values and break continuity of dashboards. Use allowlists, normalization, sampling, and aggregate counters. Avoid unbounded tags; cap the number of distinct route/operation values and alias renamed routes.
Failure modes: If StatsD is unavailable, middleware must fail open and never block or fail requests. Misconfigured headers can leak secrets/PII, create metric cardinality explosions, increase observability cost, or produce misleading dashboards. Route/operation tagging can silently produce null/empty or high-churn tags, yielding sparse or discontinuous series. Direct Symfony bundle integration can also fail at container/build time or silently not register — and the v1.1.0 event shape should not be assumed stable across future one-off releases.
Ramp-up: Low for a Laravel engineer to build the middleware pattern; moderate for observability/privacy review and for defining a stable route/operation tag taxonomy; high if the team attempts to force the archived Symfony bundle into Laravel. Recommended TPM stance: consume v1.1.0 as reference material only (it usefully confirms route/operation context is desirable), budget a small first-party middleware implementation, and require explicit header allowlisting, cardinality controls, and tag-normalization rules before production.
How can I help you explore Laravel packages today?