Download the PHP package ensi/laravel-metrics without Composer

On this page you can find all versions of the php package ensi/laravel-metrics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-metrics

General prometheus metrics for laravel

Latest Version on Packagist Tests Total Downloads

The package adds general-purpose metrics for a laravel web application. It is an addition toensi/laravel-prometheus

Installation

You can install the package via composer:

Publish the config with:

Basic Usage

Add Http Middleware

Add Guzzle Middleware to your http clients

Configuration

The structure of the configuration file

ignore_routes - a list of names of routes for which you do not need to track the processing time of http requests.
ignore_commands - a list of team names for which you do not need to track metrics.
http_requests_stats_groups - a list of histograms and percentiles. Each stats group has a list of the names of the routes that it tracks.
Thus, you can count statistics not for the entire application, but for individual groups of endpoints.

Metrics

The names of the metrics are presented without the namespace.

Name Type Labels Description
http_requests_total Counter code, endpoint Counter of incoming http requests
http_request_duration_seconds Counter code, type, endpoint Time counter for processing incoming http requests
httpstats\<name> Histogram or Summary Statistics on request processing time for the endpoint group specified in the config
log_messages_count Counter level, endpoint Number of messages in the log
queue_job_dispatched_total Counter connection, queue, job The number of jobs sent to the queue
queue_job_runs_total Counter connection, queue, job The number of processed jobs in the queue
queue_job_run_seconds_total Counter connection, queue, job Time counter for completing tasks in the queue
command_runs_total Counter command, status Number of completed commands
command_run_seconds_total Counter command, status Command execution time counter
workers_total Gauge worker Number of swoole workers
workers_idle Gauge worker Number of free swoole workers

Contributing

Please see CONTRIBUTING for details.

Testing

  1. composer install
  2. composer test

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-metrics with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.0
ensi/laravel-prometheus Version ^1.0.10
psr/http-message Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ensi/laravel-metrics contains the following files

Loading the files please wait ....