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 Prometheus Bundle Laravel Package

m6web/statsd-prometheus-bundle

Symfony bundle that bridges StatsD metrics to Prometheus: it collects counters, gauges and timings via the m6web/statsd library and exposes them in Prometheus exposition format for scraping, typically through a /metrics endpoint.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor as a drop-in, viable as a pattern. Unchanged by v8.0.2. The first thing to flag: despite being filed as a Laravel/PHP package, m6web/statsd-prometheus-bundle (repo: BedrockStreaming/StatsdTagsPrometheusBundle) is a Symfony bundle, not a Laravel package. It integrates via Symfony's Bundle registration, Configuration tree, and DI extension — none of which Laravel consumes. Laravel uses Symfony components internally but has its own container, service providers, and config publishing. There is no composer require path from this repo to a working Laravel integration.

The v8.0.2 release does not change this. It is a dependency-constraint widening only — no new features, no new public API, no Laravel affordances, no breaking changes:

  • symfony/contract allowed at 3.*
  • psr/container allowed at 2.*

Both are the kind of maintenance PR a dormant repo occasionally absorbs. They reduce one specific integration risk (container-interface collisions) and reduce nothing else. The bundle framing, the Symfony-only entry point, and the absence of a Laravel service provider all stand.

What the package actually does is narrower and more portable than the bundle framing suggests: it emits StatsD metrics in DataDog's tagged wire format and is designed to sit in front of prometheus/statsd_exporter, which translates those tagged StatsD lines into Prometheus series. That core — a statsd client plus a tag formatter — is the only piece worth evaluating for a Laravel stack.

Integration feasibility — moderate, with rework. Marginally improved. A viable path exists, but it is a port, not an install:

  • Extract or reimplement the tagged-statsd emitter as a small Laravel service provider (bind a singleton client, register a facade, publish config).
  • Skip the bundle's Symfony-specific event subscribers and middleware entirely; Laravel has no equivalent hook surface.
  • Validate the emitted tag syntax against statsd_exporter's dogstatsd_tags/datadog parser config — this remains the single highest-risk unknown and needs to be confirmed empirically, not from docs.

What v8.0.2 changes here is narrow but real: psr/container 2.* is what Laravel 10/11 pin, and symfony/contract 3.* removes one common composer why-not collision if we vendor or fork the emitter. It does not create a dependency path — we still cannot install the bundle into Laravel — but it lowers the friction of the copy/fork route in option (a)/(b) below. Estimate remains 1–2 days for a POC and 1–2 weeks for a hardened wrapper with config, testing, and failure handling.

Technical risk — high, concentrated in project health; slightly softened but not resolved. Signals are still weak across the board:

  • 3 stars, 0 dependents — no community validation, no downstream bug surface, effectively zero external usage.
  • Maintenance is dependency-only. The prior "last release May 2023" read is now outdated: there is a v8.x line and at least one merged PR in 2024/2025. But the activity is constraint bumps, not feature work, bug triage, or a supported-version policy. Interpret this as "repo is not abandoned outright," not "repo is actively maintained."
  • No visible maintainer bench, no security disclosure process, no CI/compat matrix evidence in the release notes. Symfony 7 / PHP 8.3+ support is implied by the wider contracts constraint but not verified — symfony/contract 3.* does not by itself prove Symfony 7 or PHP 8.3 compatibility of the bundle's own code.
  • Opportunity score 35.35 / overall 0.335 — unchanged; reads "low adoption, thin signal."

The functional risk is separate and more manageable: StatsD over UDP is fire-and-forget, so metric loss is silent by design. That is a property of the protocol, not this package, but it means correctness depends on the exporter and alerting layer, not the client.

Key questions to resolve before committing:

  1. Which statsd client does this wrap, and does that underlying client have a healthier upstream we could depend on directly?
  2. Does it emit dogstatsd-dialect tags (key:value comma-separated) that match our statsd_exporter mapping version, or does it require a specific exporter config?
  3. Does it support counters, gauges, timers, and histograms with tags — or only a subset? Histograms matter for latency SLOs.
  4. What are the tested PHP and Symfony version bounds in CI (release notes claim constraint relaxation, not verified support)? Does the tag formatter depend on Symfony interfaces we cannot satisfy in Laravel?
  5. Is there a maintained alternative — prometheus/client_php, a community spatie/laravel-prometheus-style package, Laravel Pulse, or OpenTelemetry PHP — that covers the same ground with active maintenance?

Integration Approach

Stack fit — narrow. Useful only if the target architecture is explicitly StatsD → statsd_exporter → Prometheus, and you need tagged metrics from PHP. If the observability stack is OpenTelemetry-first or uses Prometheus's own client_php push/pull model, this package is off-pattern and should be skipped. Unchanged by v8.0.2.

Migration path. Two distinct scenarios:

  • From Symfony: native install, low friction. Pin the Symfony version and vendor a fork for safety. v8.0.2 makes the psr/container 2 / contracts 3 combination viable, which helps here.
  • From Laravel (the actual ask): do not install the bundle. Treat the repo as a reference implementation. Either (a) port the tag-formatting logic (~200–400 LOC) into a Laravel service provider, (b) depend on the underlying statsd client directly and add a tag formatter ourselves, or (c) adopt a maintained alternative. Option (b) is usually the best effort-to-risk ratio. v8.0.2 slightly improves the odds that (a)/(b) resolve cleanly in Composer, but does not change the recommendation.

Compatibility. Verify explicitly:

  • PHP version range vs. our runtime (8.1/8.2/8.3 targets) — check CI, not the changelog.
  • Symfony component constraints — run composer why-not early. v8.0.2 removes the psr/container 2 and symfony/contract 3 blockers; other transitive constraints (event-dispatcher, http-kernel, config) are still in play and are the likely next collision.
  • statsd_exporter version and its dialect config; the tag parser has changed historically.
  • UDP availability from PHP-FPM workers and queue workers; DNS resolution behavior for the statsd host under load.

Sequencing.

  1. Validate the pipeline, not the package — stand up statsd_exporter, send a hand-crafted tagged StatsD line, confirm it lands as the expected Prometheus series. This de-risks ~60% of the integration in an afternoon.
  2. POC emit — fire one counter and one timer from a single Laravel job using the underlying client + tag formatter. Confirm labels, cardinality, and scrape visibility.
  3. Wrap — build the service provider, facade, config file, and a no-op/null driver for local and test environments.
  4. Instrument critical paths only — request latency, queue throughput, job failure counts. Resist broad instrumentation until label cardinality is understood.
  5. Dashboards and alerts before rollout completes, so the metrics have a consumer at launch.
  6. Document the fork/vendored status in the service catalog — this is now our code to maintain.

Operational Impact

Maintenance — we own it. With 0 dependents and a maintenance cadence limited to dependency bumps, assume upstream does the minimum. Budget for a vendored fork or copied logic, a quarterly dependency review, and a named owner. The v8.0.2 release is a data point that someone still merges PRs — treat it as low-grade reassurance, not as a support commitment. This remains the dominant lifecycle cost and should be priced in as ongoing, not one-time.

Support. No vendor, no SLA, no security advisory channel, no published support matrix. Internal Slack channel and one engineer's familiarity is the realistic support model. That is acceptable for a thin metric emitter; unacceptable if it becomes load-bearing for SLO reporting without a fallback.

Scaling. Three pressure points:

  • Cardinality is the real scaling risk, not throughput. Tags become Prometheus labels; per-user or per-request-ID tags will blow up the TSDB. Enforce a label allowlist in the formatter, not just in code review.
  • statsd_exporter aggregates and is the correct place to absorb cardinality and rate, but it is now a required piece of infrastructure with its own HA story.
  • UDP scales trivially on the client side (non-blocking, no connection), at the cost of silent drops under buffer pressure.

Failure modes to design for:

  • Silent metric loss — UDP drops, exporter downtime, or misconfigured tag parsing all fail quietly. Mitigate with a synthetic canary metric scraped and alerted on.
  • Label explosion — a misconfigured tag becomes thousands of series and degrades Prometheus for every team on the instance. This is the highest-blast-radius failure.
  • Blocking DNS resolution — resolving the statsd hostname inside a request path can add latency; cache aggressively or use an IP.
  • Exporter as single point of failure — its absence loses all application metrics with no client-side error.
  • Per-request overhead in PHP-FPM — serialization cost per emit; batch where possible and keep the hot path minimal.
  • Composer drift — while v8.0.2 fixed the psr/container/contracts collision, other transitive Symfony constraints can still break on a Laravel upgrade without warning.

Ramp-up. Low for a competent PHP engineer — the API is a handful of methods. The real learning curve is on the Prometheus side: tag-to-label mapping, histogram buckets, and cardinality hygiene. Plan for half a day of onboarding for the emitter and a day for the observability model.

Recommendation — unchanged. Do not adopt this package as a dependency. Reuse its tag-format approach, adopt the underlying statsd client directly, or select a maintained alternative, and own a small in-house emitter. v8.0.2 is a constraint bump: it makes the fork path marginally cleaner and slightly weakens the "abandoned" objection, but it adds no Laravel support, no functional capability, and no support guarantee. The functional need is legitimate; this artifact is still not the lowest-risk way to meet it.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin