mmz-srf/srf-datadog-statsd-bundle
A Symfony bundle for integrating Datadog StatsD metrics into PHP applications. It provides configuration and services to send counters, gauges, and timings, making it easier to instrument Symfony code and monitor application performance.
Architecture fit. There is no fit. SRFPhpDatadogStatsDBundle is a Symfony bundle, not a Laravel package. It registers via Symfony's Bundle class, DependencyInjection/*Extension, and a Configuration tree — mechanisms Laravel's ServiceProvider/Facade/config/*.php model does not consume. There is no supported bridge for loading Symfony bundles into a Laravel kernel, so integration would mean either a hand-ported rewrite or carrying a stale Symfony DI component alongside Laravel's container. Neither is a reasonable cost for what is fundamentally a ~50-line adapter around a StatsD client.
Integration feasibility. Effectively zero as-is. The package was last released 2015-09-28, targets the PHP 5.x / Symfony 2.x era, and is archived. Any modern Laravel (8+) runs PHP 7.3–8.3 with Symfony 5/6 components; Composer will almost certainly fail to resolve symfony/symfony ~2.x constraints against the framework's locked graph. Even if forced through with --ignore-platform-reqs, the 2015-era php-datadog-statsd client API (Datadogstatsd::increment, metric-name handling, no namespacing/tagging conventions) diverges from the current datadog/php-datadogstatsd client.
Technical risk. High and concentrated in abandonment. Archived repo, 2 stars, 0 dependents, no upstream to patch a CVE or a PHP 8 incompatibility. The underlying dependency is also unpinned from anything current. The only genuine asset here is the idea — wire a Datadog StatsD client into the container as a shared service — and that idea is cheap to reproduce.
Key questions.
datadog/dd-trace-php anyway?Stack fit. Treat this package as reference material, not a dependency. Reimplement as a Laravel service provider binding a singleton of the current datadog/php-datadogstatsd client, configured from config/services.php / a dedicated config/datadog.php, exposed through a thin facade or injected interface. This is a half-day of work and yields a dependency the team actually controls.
Migration path. (1) Add datadog/php-datadogstatsd and pin it. (2) Create DatadogStatsdServiceProvider with a singleton resolving host/port/namespace/global tags from env. (3) Define a small MetricsClient interface so tests can bind a null/in-memory implementation, and so a later swap to the DogStatsD sidecar or OpenTelemetry is non-breaking. (4) Add a config flag to disable emission in local/test. (5) Instrument deliberately — request latency, queue throughput, cache hit rates, error counters — rather than blanket-emitting.
Compatibility. Verify PHP 8.x support on the chosen client, confirm UDP egress from every runtime (web, queue workers, scheduler), and confirm the Agent is reachable in each environment (sidecar in Kubernetes vs. host:port on VMs). If the package's namespace/tag conventions were baked into existing dashboards, port those strings verbatim into the new config so dashboards don't break.
Sequencing. Client selection → provider + config → interface + test double → one pilot service instrumented → dashboard validation → rollout. Do not sequence this behind a port of the bundle; the port is the riskiest, least valuable path.
Maintenance. Near-zero if reimplemented (~one provider file, one config file). Non-trivial and permanent if forked — the team inherits a PHP 5-era codebase with no upstream, and every PHP/framework upgrade becomes a manual audit. The asymmetry strongly favors the native provider.
Support. None available. Archived repo, no maintainer response path, no issue triage. Any production incident traced to metric emission becomes internal-only debugging against unfamiliar 2015 code.
Scaling. The metric path itself scales well — StatsD is fire-and-forget UDP to a local Agent, so throughput cost is negligible and there is no synchronous network dependency in the request path. The scaling concern is aggregation: per-process client instances, unbounded tag cardinality (user IDs, request IDs as tags) will blow up the Agent and Datadog bill. Enforce a tag allowlist in config and review cardinality before wide rollout. Queue workers need the same provider bootstrapped — a common gap.
Failure modes. UDP packet loss under load or buffer exhaustion (silent, by design — metrics are best-effort). DNS/Agent unavailability causing blocking sendto retries or exceptions in the request path if the client is misconfigured; guard with try/catch and a disable switch. Container/Agent version drift producing dropped or malformed metrics with no client-side error. Silent under-emission is the worst case: dashboards look healthy because data stopped arriving, not because the system is healthy — pair with a heartbeat/deadman metric and alert on metric-absence, not just metric-threshold.
Ramp-up. Low for the reimplementation path — any Laravel developer can read a two-file provider. Effectively unbounded for the port path, since it requires Symfony 2 DI literacy plus archaeology on a decade-old client.
Verdict. Do not adopt. The package is archived, framework-mismatched, and functionally thin; the score of 0.005 reflects that. Capture the single good idea — container-managed StatsD client — in a native Laravel provider and move on.
How can I help you explore Laravel packages today?