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
Statsdbundle

Statsdbundle Laravel Package

tarjei/statsdbundle

A PHP/Symfony bundle for StatsD metrics integration, offering a simple service to send counters, timers, and gauges to a StatsD daemon. Helps add lightweight application monitoring and performance instrumentation with minimal setup.

View on GitHub
Deep Wiki
Context7

A bundle creating a StatsD client for use with Symfony2

Frequently asked questions about Statsdbundle
Can I install tarjei/statsdbundle in a Laravel application?
No, not reliably. The package is a Symfony 2 bundle that registers a StatsD client through Symfony's dependency injection container, Bundle classes, services.yml and configuration trees, none of which exist in Laravel. Installing it would also pull in symfony/framework-bundle, symfony/dependency-injection and symfony/config at 2.x constraints, which conflict with the modern Symfony components Laravel ships with. Treat it as a reference implementation rather than a dependency.
What is tarjei/statsdbundle actually used for?
It wires a StatsD client into a Symfony 2 application as a service so you can emit counters, timers and gauges over UDP to a StatsD daemon. The bundle itself is a thin integration layer, roughly one client class plus configuration, that forwards metrics to Graphite, Prometheus via statsd_exporter, or Datadog. The underlying StatsD concept works in any PHP stack, but the Symfony bundle wiring does not translate to Laravel.
Is tarjei/statsdbundle still maintained?
Effectively no. Symfony 2 reached end of life in 2018, the repository shows no recent activity, and it has a very small star count with essentially no community support. There are no security backports, so any vulnerability in its pinned transitive dependencies becomes your problem. Adopting it shifts the entire maintenance burden onto your team.
What PHP and Laravel versions does this bundle support?
The bundle targets the PHP 5.x and 7.0 era that Symfony 2 supported, and its composer.json reflects that. Modern Laravel requires PHP 8.1 or newer, so the constraint will not be satisfiable alongside a current Laravel install. Always check the composer.json constraints of any candidate package against your runtime before evaluating further.
What is the best way to add StatsD metrics to a Laravel app?
Do not install the Symfony bundle. Instead adopt a maintained PHP StatsD client such as league/statsd, bind a configured instance as a singleton in a StatsdServiceProvider, and add a config/statsd.php file with host, port, namespace and an enabled flag. Expose the client through a facade or an injectable interface so application code stays framework agnostic. The whole integration is typically 50 to 100 lines.
How do I configure the StatsD host, port and namespace in Laravel?
Create config/statsd.php returning host, port, namespace and protocol values, reading them from environment variables via env(). In the service provider, resolve the client with those values and register it as a singleton so a single connection is reused. Mirror the bundle's intent by adding a flag that disables emission entirely in local and testing environments.
Do StatsD metrics work with Datadog, Graphite or Prometheus from PHP?
Yes, StatsD is protocol-level, so the client just sends UDP datagrams to a local statsd, telegraf or statsd_exporter daemon, which forwards to your backend. The most common cause of missing metrics is a protocol mismatch, for example sending UDP while the daemon listens on TCP or a Unix socket. Verify the transport, host and port against your daemon configuration before instrumenting application code.
How do I test that StatsD metrics are emitted in Laravel?
Bind a fake or no-op StatsD client implementation in the container during tests and assert against recorded calls instead of sending real UDP packets. Because the client is resolved from the container, a single binding in a test case swaps out emission for the entire suite. This is a strong argument for a self-owned service provider over a framework bundle you cannot easily fake.
Can I reuse the StatsD client class without the Symfony bundle?
The only transferable artifact is the underlying client the bundle wires up, and even that is likely tied to older Symfony and PHP constraints. Rather than copy it, use a maintained client such as league/statsd and port any custom metric naming conventions from the bundle's configuration into your new config file. This keeps the observable behavior while removing the dead dependency.
What is the migration path from this Symfony bundle to Laravel?
Confirm first that the target application is genuinely Laravel and not a Symfony project mislabeled in a ticket. Then prototype a service provider around league/statsd in a branch, validate that one counter and one timing reach your backend end to end, and only then instrument code starting with request latency and error counts. Finally, remove references to the Symfony bundle from documentation and planning artifacts so the assumption does not propagate.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections