File tree Expand file tree Collapse file tree 6 files changed +53
-17
lines changed
Expand file tree Collapse file tree 6 files changed +53
-17
lines changed Original file line number Diff line number Diff line change 99 build :
1010 strategy :
1111 matrix :
12- php : [ "8.0", "8.1" ]
12+ php : [ "8.0", "8.1", "8.2" ]
1313 runs-on : ubuntu-latest
1414
1515 steps :
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ coverage.xml
66.php_cs.cache
77examples /lumen-app /vendor
88.phpunit.cache
9+ .phpunit.result.cache
Original file line number Diff line number Diff line change 11# Laravel (and Lumen) Prometheus Exporter
22
3+ ## Version Compatibility
4+
5+ | Releases | PHP |
6+ | :---------| :-------|
7+ | 3.x | ^8.1; |
8+ | 4.x | ^8.2; |
9+
310A prometheus exporter package for Laravel and Lumen.
411
512[ ![ Software License] ( https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square )] ( LICENSE )
@@ -23,6 +30,34 @@ library's functionality and the way it's intended to be used.
2330
2431## Installation
2532
33+ ### Laravel 10
34+
35+ #### Install via composer
36+ Run the following command:
37+ ``` bash
38+ composer require arquivei/laravel-prometheus-exporter
39+ ```
40+
41+ #### Add service provider
42+ Add the service provider to the ` providers ` array in the ` config/app.php ` config file as follows:
43+ ``` bash
44+ ' providers' => [
45+
46+ ...
47+
48+ Arquivei\L aravelPrometheusExporter\P rometheusServiceProvider::class,
49+ ]
50+ ```
51+
52+ #### Publish the config
53+ Run the following command:
54+ ``` bash
55+ php artisan vendor:publish --provider=" Arquivei\LaravelPrometheusExporter\PrometheusServiceProvider"
56+ ```
57+ You should now have a ` config/prometheus.php ` .
58+
59+
60+ ### Laravel 9 or below
2661Add the repository to composer.json
2762``` composer.json
2863"repositories" : [
Original file line number Diff line number Diff line change 88 }
99 ],
1010 "require" : {
11- "php" : " ^8.0 || ^8.1" ,
11+ "php" : " ^8.0 || ^8.1 || ^8.2 " ,
1212 "guzzlehttp/guzzle" : " ^7.4.2" ,
13- "illuminate/routing" : " ^9.0" ,
14- "illuminate/support" : " ^9.0" ,
13+ "illuminate/routing" : " ^9.0 || ^10.0 " ,
14+ "illuminate/support" : " ^9.0 || ^10.0 " ,
1515 "promphp/prometheus_client_php" : " ^2.6.0"
1616 },
1717 "require-dev" : {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3- xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.5/phpunit.xsd"
4- bootstrap =" vendor/autoload.php"
5- cacheResultFile =" .phpunit.cache/test-results"
6- executionOrder =" depends,defects"
7- beStrictAboutOutputDuringTests =" true"
8- beStrictAboutTodoAnnotatedTests =" true"
9- failOnRisky =" true"
10- failOnWarning =" true"
11- verbose =" true"
12- colors =" true" >
13-
2+ <phpunit
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.0/phpunit.xsd"
5+ bootstrap =" vendor/autoload.php"
6+ executionOrder =" depends,defects"
7+ beStrictAboutOutputDuringTests =" true"
8+ failOnRisky =" true"
9+ failOnWarning =" true"
10+ displayDetailsOnTestsThatTriggerNotices =" true"
11+ colors =" true"
12+ cacheDirectory =" .phpunit.cache" >
1413 <testsuites >
1514 <testsuite name =" default" >
1615 <directory suffix =" Test.php" >tests</directory >
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ private function loadRoutes()
104104
105105 private function configPath ($ path ) : string
106106 {
107- return $ this ->app ->basePath () . ($ path ? DIRECTORY_SEPARATOR . $ path : '' );
107+ $ basePath = sprintf ('%s/%s ' , $ this ->app ->basePath (), 'config ' );
108+ return $ basePath . ($ path ? DIRECTORY_SEPARATOR . $ path : '' );
108109 }
109110}
You can’t perform that action at this time.
0 commit comments