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
Statsd Request Headers Bundle

Statsd Request Headers Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

m6web/statsd-request-headers-bundle is a Symfony bundle that extracts request header values and forwards them to StatsD as metrics. It lets you define which headers to track and how they map to metric names, making it easy to monitor things like API versions, client types, or routing hints directly from incoming traffic without writing custom instrumentation.

  • Configurable header-to-metric mapping via bundle configuration
  • Automatic StatsD counter/timer submission on each request
  • Integrates with the Symfony event system for zero-touch collection
  • Works with the m6web StatsD client ecosystem
  • Lightweight and easy to register as a Symfony bundle
Frequently asked questions about Statsd Request Headers Bundle
Is m6web/statsd-request-headers-bundle compatible with Laravel?
No, it is a Symfony bundle, not a Laravel package. It relies on Symfony HttpKernel, EventDispatcher, and DI conventions, so Laravel will not auto-register it or run it as native middleware. Treat it as a reference implementation rather than a Composer dependency for a Laravel app.
Can I install m6web/statsd-request-headers-bundle in a Laravel project with Composer?
Composer may resolve it, but installation does not make it a working Laravel integration. The bundle expects Symfony bundle registration and older Symfony/PHP assumptions from the 2016 era. Direct use should be time-boxed as a spike, not added to the production dependency graph.
What does m6web/statsd-request-headers-bundle actually do?
It captures incoming HTTP request headers and forwards them as metrics to StatsD. The goal is visibility into header usage and client behavior across an application. In a Laravel context, that behavior is better implemented as HTTP middleware with a maintained StatsD client.
How do I send request header metrics to StatsD from Laravel middleware?
Create middleware that reads an explicit allowlist of headers from the request and emits counters, gauges, or tags through a maintained StatsD client. Keep metric names stable, apply sampling, and gate the middleware by environment and configuration. Avoid emitting raw values unless there is a reviewed need and a cardinality budget.
Which request headers should I allowlist for StatsD metrics in Laravel?
Allowlist only headers tied to a concrete business or observability question, such as a client or device identifier when it is safe to emit. Never emit authorization, cookie, API key, session, or other secret-bearing headers. Prefer presence counters or bounded categories over raw values, and document the allowlist.
Is m6web/statsd-request-headers-bundle maintained and safe for production?
The repository is marked deprecated and the last release was in 2016, with no active maintenance signal. Direct production use would make the team responsible for an archived Symfony dependency. For Laravel, a small team-owned middleware port is the safer and clearer path.
What are alternatives to m6web/statsd-request-headers-bundle for Laravel?
The practical alternative is Laravel HTTP middleware plus a maintained StatsD client, configured with an allowlist, metric prefix, sampling, and environment gating. If you need broader tracing, evaluate OpenTelemetry or your existing APM/middleware standard instead of a deprecated Symfony bundle. Choose the option that fits your current metrics backend and cardinality budget.
How do I avoid high cardinality when sending request header metrics to StatsD?
Do not send raw header values or unbounded identifiers as metric names or tags. Normalize values into a small set of categories, or emit presence counters when values are not needed. Define a cardinality budget with the backend team and test metric volume in staging with sampling enabled before rollout.
Does the bundle support modern PHP and Laravel versions?
The package's Symfony-version assumptions are from the 2016 era, and compatibility with modern PHP or Laravel is uncertain and likely poor. Laravel version support is not a meaningful target because the package is not a Laravel package. Validate any spike against your exact Laravel, PHP, StatsD client, and backend versions.
How should I test a Laravel StatsD request-header middleware implementation?
Unit-test the allowlist and value-transformation logic with fake requests, and feature-test that only permitted headers produce metrics. Use a fake or in-memory StatsD client in tests, then run a staging spike with sampling to compare metric volume and utility. Include negative tests for secrets, PII, and unbounded values.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core