- Can I install mtxserv/metric-bundle in a Laravel application?
- You can add it with Composer, but it will not work as a Laravel metrics package. It is a Symfony2 bundle built on Symfony bundle registration, YAML and XML dependency-injection service definitions, and the Symfony 2.x EventDispatcher. Laravel uses service providers, middleware, and config/*.php conventions, and the package provides no adapter or bridge. Treat it as a reference implementation, not a dependency.
- Does mtxserv/metric-bundle support Laravel 10 or Laravel 11?
- No. The package predates modern Laravel and targets Symfony2, which reached end of life in November 2018. Its 2016 release implies a PHP 5.x or early PHP 7 codebase without typed properties or return type declarations, so it is a language-level mismatch with Laravel 10 or 11 on PHP 8.1 and newer. There is no Laravel service provider, facade, or middleware integration.
- What PHP versions does mtxserv/metric-bundle require?
- The bundle's 2016 release date and Symfony2 target point to PHP 5.x or early PHP 7.0-era code. It does not align with the PHP 8.1 and newer runtimes used by modern Laravel or Symfony 6.x and 7.x. That makes it a PHP compatibility problem as well as a framework compatibility problem.
- How do I install and configure mtxserv/metric-bundle?
- For a Symfony2 project you would register the bundle and configure its dependency-injection services via YAML or XML, but that setup does not translate to Laravel. In Laravel there is no bundle registration step and no Symfony dependency-injection config tree to publish. Because the repository is archived and has no Laravel adapter, there is no supported installation path for a Laravel app.
- What does mtxserv/metric-bundle actually do?
- It is a lightweight Symfony bundle for collecting application metrics such as counters, gauges, and timers. It exposes collectors through a simple API and supports pluggable storage and exporter backends, with service tags for custom metrics. Its plausible value is the instrumentation points it chose, not a large codebase; the bundle is likely only a few hundred lines.
- Is mtxserv/metric-bundle safe to use in production?
- No, not for a modern Laravel or Symfony application. The repository is archived, so there is no security response, no CVE triage, and no protocol drift fixes. The era-appropriate InfluxDB PHP client is also unmaintained and predates InfluxDB 2.x token authentication and Flux. Adding it will surface in composer audit and SCA tooling as unfixable noise.
- What are the best alternatives to mtxserv/metric-bundle for Laravel metrics?
- Use OpenTelemetry PHP as the instrumentation layer with an exporter for InfluxDB, Prometheus, or OTLP; that decouples instrumentation from the backend. If you want minimal dependencies, build a small in-house Laravel service provider plus middleware for request timing and a facade or service for business counters. Both options avoid the abandoned Symfony2 bundle and its 2016-era dependencies.
- How do I migrate from mtxserv/metric-bundle to Laravel?
- Do not port the bundle code. Read it only to extract the configuration schema, the request lifecycle hook points where timing was captured, and the write or batching pattern used to flush points. Then reimplement request timing as Laravel middleware or terminable middleware and business counters as a service or facade. Use a maintained client such as the official InfluxDB PHP client or an OpenTelemetry exporter.
- Can mtxserv/metric-bundle export metrics to InfluxDB 2.x or 3.x?
- Probably not reliably. The bundle is from 2016 and its likely InfluxDB client predates InfluxDB 2.x token authentication, buckets, and the Flux query language. InfluxDB 1.x line protocol over HTTP is the only era-appropriate target. If InfluxDB 2.x or 3.x is mandated, use a current client or an OpenTelemetry exporter instead.
- Is mtxserv/metric-bundle maintained and tested?
- No active maintenance is evident: the repository is archived, the last release appears to be from 2016, and it has zero stars and zero dependents. There is no visible community validation or modern CI and test story for PHP 8 and newer or current frameworks. Archived status means no security fixes or compatibility updates should be expected.