dreamfactory/df-exporter-prometheus
DreamFactory module that exports DreamFactory platform metrics to Prometheus, enabling monitoring and alerting of your API platform. Note: this package is unmaintained and has no stars, so evaluate before production use.
Architecture fit. Despite the "Laravel/PHP package" framing, this is not a general-purpose Laravel package — it is a DreamFactory platform module that happens to be built on Laravel (DreamFactory's API platform runs on Laravel). It hooks into the DreamFactory service-provider and routing layer to expose a Prometheus-scrapeable metrics endpoint (typically under /api/v2/...). It fits only if the target application is a DreamFactory instance. For a vanilla Laravel app, it is not directly consumable; the architectural value is the pattern (a metrics controller + registry) rather than the code.
Integration feasibility. Installation is a Composer require into the df-skeleton instance, followed by service-provider/route registration and .env configuration. Feasibility is medium-to-low as-is: the last release is 2019-10-08, which predates several DreamFactory major versions and Laravel 8/9/10/11. Expect dependency-constraint conflicts (laravel/framework, guzzlehttp/guzzle, PSR interfaces) and possible namespace/route-registration drift. Realistic path is fork-and-patch, not composer require.
Technical risk.
Key questions.
composer.json resolve against it?Stack fit. Assumes a DreamFactory deployment on PHP 7.x/Laravel 5.6–6.x with Prometheus + Grafana as the observability backend. It is not a fit for Laravel 9+/PHP 8.2+ without code changes. If the application is plain Laravel rather than DreamFactory, prefer an actively maintained exporter (e.g., a promphp/prometheus_client_php-based Laravel package) and treat this repo as reference only.
Migration path. Three options, in order of preference:
df-skeleton config, and add endpoint auth. Cost is bounded because the codebase is small.Compatibility. Validate: Composer solve against the pinned DF version; service-provider auto-discovery vs manual registration in config/app.php; route prefix and middleware collisions; config merge behavior on php artisan config:cache; PHP extension requirements (APCu/Redis for the metrics store backend, if used).
Sequencing.
Maintenance. Effectively no upstream support. The team inherits the full maintenance burden: dependency upgrades on every DreamFactory/PHP bump, security review of the endpoint, and metric-schema ownership. Budget roughly 1–2 engineer-weeks to productionize the fork and ~2–5% of an engineer ongoing, spiking at each platform upgrade.
Support. Community-only; no vendor SLA. Apache-2.0 permits internal forking and redistribution, which mitigates the bus-factor problem but does not eliminate it. Document the fork's owner explicitly — an unowned fork becomes a silent outage risk.
Scaling. The exporter's cost scales with scrape frequency × metric collection cost, not with API traffic, unless instrumentation is per-request. Watch for: per-scrape database queries against DF's metadata store, unbounded label sets (user IDs, endpoint paths, tenant IDs), and lock contention if a file/APCu backend is used. Cap cardinality at the label-design stage; enforce scrape intervals of 15–60s; cache expensive aggregates for one scrape cycle.
Failure modes.
up == 0 alert and a fallback sidecar.Ramp-up. Low for a PHP engineer comfortable with Laravel service providers, Composer, and Prometheus exposition format: ~1–2 days to read the code and stand up a staging instance, ~1–2 weeks to fork, patch, secure, and instrument. The steeper learning curve is DreamFactory platform internals (service wiring, config layering), not this package. Given the package's 2019 vintage, zero adoption, and 0.23 score, treat it as reference implementation rather than a dependency — the strongest TPM recommendation is to build a thin, owned exporter against the current DreamFactory runtime instead of adopting this artifact.
How can I help you explore Laravel packages today?