Download the PHP package altelma/laravel-prometheus-exporter without Composer

On this page you can find all versions of the php package altelma/laravel-prometheus-exporter. 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-prometheus-exporter

Laravel Prometheus Exporter

Latest Version on Packagist Total Downloads

A prometheus exporter package for Laravel and Lumen.

This package is a wrapper bridging promphp/prometheus_client_php into Laravel and Lumen.

However, This package get inspire from another package below

Feel free to use above package instead, because this package just try to cover compatibility for previous version of Laravel and Lumen such as 6.x to 8.x, etc.

Installation

Install the package via composer

If you are using Lumen need to register the service provider in bootstrap/app.php

Configuration

The package has a default configuration which uses the following environment variables.

Metrics with multiple pods in k8s

If you want to expose metrics endpoint with application that running in k8s. It needs to store the same information with a single endpoint. So you need to add config like below

You need to ensure config set like this and this support Redis adapter only

Metrics

The package allows you to observe metrics on the application routes. Metrics on request method, request path and status code.

Laravel

In order to observe metrics in Laravel application routes (the time between a request and response), you should register the following middleware in your application's app/Http/Kernel.php:

Lumen 9.x

In order to observe metrics in Lumen application routes (the time between a request and response), you should register the following middleware in your application's bootstrap/app.php:

Lumen 8.x and Lower

In Lumen 8.x and lower, cannot get route in global middleware just need to do in route middleware instead

Protect metrics endpoint

If you need to prevent someone see your routes in /metrics you can add middleware to protect your endpoint. Now we start to support only basic_auth to protect you metrics endpoint

สนับสนุนผมได้นะ ☕

สวัสดีเพื่อนๆ ทุกคนนะครับ หากมีข้อเสนอแนะอะไร แนะนำมาได้นะครับ นอกจากนี้ เพื่อนๆ สามารถแวะไปอ่านบทความของผมเพิ่มเติมได้ ที่นี่ ครับ

Bug Report

This package is not perfect right, but can be improve together. If you found bug or have any suggestion. Send that to me or new issue. Thank you to use it.


All versions of laravel-prometheus-exporter with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
illuminate/routing Version *
promphp/prometheus_client_php Version ^2.6
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 altelma/laravel-prometheus-exporter contains the following files

Loading the files please wait ....