Compare commits

...

12 commits

Author SHA1 Message Date
27059f85c7 Update dependencies 2022-11-26 23:17:00 +01:00
267a1f7039
Updated dependencies for laravel 9 2022-02-17 11:21:05 +01:00
Eamon Boonzaaier
a581a2b145
Merge pull request #27 from alsma/patch-1
Adding support for laravel 8
2021-06-23 13:51:32 +02:00
Alexander Smaga
f4d1481c19
Adding support for laravel 8 2020-10-26 11:55:00 +02:00
Nic Appleby
6e874128e8
Update changelog for release 2020-03-16 11:02:49 +02:00
Stefan Bauer
885f959ce9
Make Laravel 7.0 compatible (#14) 2020-03-16 11:01:52 +02:00
janwehner
39442da599
update call to array_get helper to use the Illuminate\Support\Arr class (#13)
Co-authored-by: Jan Wehner <jan.wehner@securepoint.de>
2020-03-16 11:01:29 +02:00
Nic Appleby
c1cd48549f
Update changelog for release 2019-10-17 09:46:09 +02:00
Luca Critelli
c8ef2037dc Update composer to work with Laravel 5 and Laravel 6 (#10)
Update composer to work with Laravel 5 and Laravel 6
2019-10-17 09:45:01 +02:00
Nic Appleby
4174a30cd5
Update changelog for release 2019-02-11 15:57:56 +02:00
Jarryd Tilbrook
d6ec61c8bc Enable package discovery for laravel 5.5+ (#5) 2019-02-11 15:56:48 +02:00
Nic Appleby
ae1f632ebe
Don't test against PHP 8.0 (#6)
* try upgrade phpunit

* Don't test against PHP *

* Don't upgrade phpunit actually

* Test against PHP 7.3
2019-02-11 15:19:22 +02:00
5 changed files with 36 additions and 16 deletions

View file

@ -4,7 +4,8 @@ php:
- 5.6
- 7.0
- 7.1
- nightly
- 7.2
- 7.3
before_install:
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

View file

@ -2,13 +2,6 @@
A prometheus exporter for Laravel.
[![Author](http://img.shields.io/badge/author-@superbalist-blue.svg?style=flat-square)](https://twitter.com/superbalist)
[![Build Status](https://img.shields.io/travis/Superbalist/laravel-prometheus-exporter/master.svg?style=flat-square)](https://travis-ci.org/Superbalist/laravel-prometheus-exporter)
[![StyleCI](https://styleci.io/repos/98516814/shield?branch=master)](https://styleci.io/repos/98516814)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Packagist Version](https://img.shields.io/packagist/v/superbalist/laravel-prometheus-exporter.svg?style=flat-square)](https://packagist.org/packages/superbalist/laravel-prometheus-exporter)
[![Total Downloads](https://img.shields.io/packagist/dt/superbalist/laravel-prometheus-exporter.svg?style=flat-square)](https://packagist.org/packages/superbalist/laravel-prometheus-exporter)
This package is a wrapper bridging [jimdo/prometheus_client_php](https://github.com/Jimdo/prometheus_client_php) into Laravel.
## Installation

View file

@ -1,5 +1,18 @@
# Changelog
## 1.0.5 - 2020-03-16
* Update call to array_get helper to use the Illuminate\Support\Arr class
* Enable Laravel 7 compatability
## 1.0.4 - 2019-10-17
* Enable Laravel 6.0 compatability
## 1.0.3 - 2019-02-11
* Enable package discovery for laravel 5.5+
## 1.0.2 - 2019-01-16
* Add compatability with Laravel Lumen (make named route configurable)

View file

@ -6,13 +6,17 @@
{
"name": "Superbalist.com a division of Takealot Online (Pty) Ltd",
"email": "info@superbalist.com"
},
{
"name": "Sirius",
"email": "sirius@wir-sind-auch-menschen.de"
}
],
"require": {
"php": ">=5.6.0",
"illuminate/support": "^5.3",
"illuminate/routing": "^5.3",
"jimdo/prometheus_client_php": "^0.9.0"
"php": "^7.4|^8.0",
"illuminate/support": "^7.0 || ^8.0 || ^9.0",
"illuminate/routing": "^7.0 || ^8.0 || ^9.0",
"promphp/prometheus_client_php": "^v2.4"
},
"autoload": {
"psr-4": {
@ -23,10 +27,18 @@
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"laravel": {
"providers": [
"Superbalist\\LaravelPrometheusExporter\\PrometheusServiceProvider"
],
"aliases": {
"Prometheus": "Superbalist\\LaravelPrometheusExporter\\PrometheusFacade"
}
}
},
"require-dev": {
"phpunit/phpunit": "^5.5",
"mockery/mockery": "^0.9.5"
"phpunit/phpunit": "^9.5",
"mockery/mockery": "^1.5"
}
}

View file

@ -2,6 +2,7 @@
namespace Superbalist\LaravelPrometheusExporter;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
use Prometheus\CollectorRegistry;
use Prometheus\Storage\Adapter;
@ -50,7 +51,7 @@ class PrometheusServiceProvider extends ServiceProvider
$factory = $app['prometheus.storage_adapter_factory']; /** @var StorageAdapterFactory $factory */
$driver = config('prometheus.storage_adapter');
$configs = config('prometheus.storage_adapters');
$config = array_get($configs, $driver, []);
$config = Arr::get($configs, $driver, []);
return $factory->make($driver, $config);
});
$this->app->alias(Adapter::class, 'prometheus.storage_adapter');