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

Prometheus Bundle Laravel Package

ijanki/prometheus-bundle

ijanki/prometheus-bundle provides a Symfony integration for Prometheus monitoring. It exposes configurable application and infrastructure metrics via a scrape-ready endpoint, making it easy to collect, visualize, and alert on service health.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a Symfony bundle, not a Laravel package, and that distinction is the whole assessment. The bundle's only job is dependency-injection wiring: it registers the TweedeGolf Prometheus client in a Symfony service container and exposes a metrics endpoint via Symfony configuration. Laravel has no bundle concept — service providers, facades, and middleware are the equivalents. There is no clean architectural seam for this package inside a Laravel application without adaptation work that effectively replaces the package's entire surface area. The reusable asset here is the idea (a Prometheus client behind a DI boundary plus a /metrics route), not the code.

Integration feasibility. Low as a direct dependency. The package last shipped in December 2018, targets the Symfony 3/4 era, and has 1 star and 0 dependents — meaning no one has validated it against a modern PHP runtime, let alone a modern Laravel or Symfony release. The underlying client (TweedeGolf prometheus_client_php) has since been succeeded by the community fork PromPHP; the bundle pins to the deprecated lineage. A Laravel team adopting this would spend more time fighting Composer constraints and PSR-11 incompatibilities than writing the ~150 lines of service provider and middleware it would take to do this natively.

Technical risk. Consequential and stacked:

  • Abandonment risk: Single maintainer, no releases in six-plus years, no dependents, no issue activity. Effectively an unmaintained artifact.
  • Runtime incompatibility: PHP 8.1+ (required by Laravel 10/11) and Symfony 5/6/7 container contracts almost certainly break installation or runtime behavior.
  • Supply-chain exposure: An unmaintained package in the dependency graph is a standing security and audit liability, even for a small DI wrapper.
  • False confidence: Low scores like 0.005 reflect the absence of any adoption signal — there is no community to catch defects before you do.

Key questions.

  1. Is the target application actually Symfony, or is this being evaluated for a Laravel codebase? If Laravel, the package is disqualified and only the pattern is relevant.
  2. What is the underlying requirement — instrumented application metrics, a Prometheus scrape endpoint, or both?
  3. Which PHP and framework versions are in scope, and what are the existing Composer constraints?
  4. Is there an incumbent observability stack (OpenTelemetry, Datadog, existing Prometheus client) that makes this redundant?
  5. What metric types are needed — counters, gauges, histograms, summaries — and what cardinality budget applies?
  6. Who owns this code if we vendor or fork it?

Integration Approach

Stack fit. Poor for Laravel, acceptable only for legacy Symfony. For a Laravel application the correct move is to use the maintained Prometheus client (PromPHP prometheus_client_php) directly behind a Laravel service provider, exposing /metrics through a route registered by that provider and instrumenting via middleware. This preserves the bundle's intent at roughly the same complexity, on a supported dependency. Treat the bundle as a reference implementation, not a dependency.

Migration path. Do not fork the bundle — that inherits its maintenance burden for no gain. Instead, extract the design: singleton-registered client, storage adapter binding, metrics route, and console command for inspection. Reimplement these as a small internal package. If the target truly is Symfony and is pinned to an old version, install the bundle as-is but immediately record it on the technical-debt register with a replacement ticket, and scope it to a single service.

Compatibility. Verify Composer resolution first — PHP constraint, Symfony container version, PSR-11 interface version, and the storage adapter (APCu, Redis, in-memory). For Laravel, the Redis adapter can be backed by the application's existing Redis connection, which is the pragmatic choice for multi-instance deployments; APCu is per-process and will fragment metrics across PHP-FPM workers unless carefully handled.

Sequencing.

  1. Resolve the framework question decisively — this gates everything else.
  2. Select the client library and confirm it installs against the current PHP/framework baseline.
  3. Build the service provider, storage adapter binding, and /metrics route.
  4. Restrict the metrics endpoint at the network or middleware layer before it ever sees production traffic.
  5. Instrument incrementally: HTTP request metrics first, then queue/job metrics, then domain-specific counters.
  6. Stand up scrape configuration and dashboards in parallel with instrumentation, not after.

Operational Impact

Maintenance. Effectively zero upstream maintenance; ownership transfers entirely to the adopting team. If the package is used directly, expect to pin and patch it yourself. The native reimplementation is small enough to sit comfortably inside a platform team's routine maintenance envelope — this is the strongest argument against taking the dependency.

Support. There is no support channel. No maintainer responsiveness, no security advisories, no CVE feed. Any incident involving this package is an internal escalation with no external backstop. That is an acceptable posture for a 150-line internal wrapper and an unacceptable one for a third-party dependency.

Scaling. The scaling risk is in the metrics model, not the bundle. Prometheus is pull-based, so every instance must expose a consistent endpoint and be discoverable by the scraper — this interacts with autoscaling and service discovery. Cardinality is the real hazard: unbounded label values (user IDs, request paths, raw URLs) will inflate memory in the storage adapter and destabilize both the application and the Prometheus server. Enforce a label hygiene policy before instrumenting, and monitor series count as a first-class metric.

Failure modes.

  • Metrics storage backend unavailable — the application must degrade gracefully rather than fail requests; wrap emission in try/catch and drop metrics under duress.
  • Cardinality explosion — memory pressure in Redis/APCu, slow scrapes, Prometheus ingestion throttling. Mitigate with label allowlists and per-metric series caps.
  • Endpoint exposure — /metrics leaking internal topology or identifiers if left publicly routable. Network-restrict by default.
  • Silent breakage on framework upgrade — an abandoned bundle failing after a routine PHP bump is a plausible, low-warning outage vector.
  • Metric drift — dashboards diverging from reality as instrumentation changes without ownership.

Ramp-up. The concept is trivial; the bundle is a thin DI wrapper and any competent Laravel or Symfony engineer can reproduce it in a day or two. The genuine effort sits in instrumentation design — choosing metric types, defining label sets, setting cardinality budgets, and building dashboards that answer operational questions. Budget days for the wiring and one to two weeks for instrumentation and dashboards done properly, and assign explicit ownership so the metrics remain trustworthy after launch.

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/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
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route