{"id":19325091,"url":"https://github.com/spatie/laravel-prometheus","last_synced_at":"2025-04-04T18:08:30.661Z","repository":{"id":163110770,"uuid":"638542106","full_name":"spatie/laravel-prometheus","owner":"spatie","description":"Export Laravel metrics to Prometheus","archived":false,"fork":false,"pushed_at":"2024-04-29T13:39:58.000Z","size":907,"stargazers_count":119,"open_issues_count":3,"forks_count":19,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-01T11:45:48.349Z","etag":null,"topics":["devops","laravel","measure","prometheus"],"latest_commit_sha":null,"homepage":"https://freek.dev/2507-visualising-laravel-and-horizon-metrics-using-prometheus-and-grafana","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spatie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support-us.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-09T15:15:15.000Z","updated_at":"2024-06-12T16:37:30.767Z","dependencies_parsed_at":"2023-11-27T14:40:58.089Z","dependency_job_id":"d582190a-2ad0-4c7d-b46b-70eed00eca06","html_url":"https://github.com/spatie/laravel-prometheus","commit_stats":{"total_commits":106,"total_committers":13,"mean_commits":8.153846153846153,"dds":"0.21698113207547165","last_synced_commit":"d9b2478eae324f83cc22049f9ebe7b3a7a7aac0d"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Flaravel-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatie","download_url":"https://codeload.github.com/spatie/laravel-prometheus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","laravel","measure","prometheus"],"created_at":"2024-11-10T02:08:51.125Z","updated_at":"2025-04-04T18:08:30.639Z","avatar_url":"https://github.com/spatie.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Export Laravel metrics to Prometheus\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/laravel-prometheus.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-prometheus)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/spatie/laravel-prometheus/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/spatie/laravel-prometheus/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/spatie/laravel-prometheus/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/spatie/laravel-prometheus/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/spatie/laravel-prometheus.svg?style=flat-square)](https://packagist.org/packages/spatie/laravel-prometheus)\n\nThis package can export key metrics of your app to [Prometheus](https://prometheus.io). It does this by providing an easy way to register metrics. Here's an example where we are going to export the user count to Prometheus.\n\n```php\nPrometheus::addGauge('User count')\n    -\u003evalue(fn() =\u003e User::count());\n```\n\nThese metrics will be exposed at the `/prometheus` endpoint. The package offers a way to add a security layer, so your key metrics don't become public.\n\nYou can configure your Prometheus instance to periodically crawl and import the metrics at the `/prometheus` endpoint of your app. Using [Grafana](https://grafana.com), you can visualize the data points that are stored in Prometheus.\n\n\n## Support us\n\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/laravel-prometheus.jpg?t=1\" width=\"419px\" /\u003e](https://spatie.be/github-ad-click/laravel-prometheus)\n\nWe invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).\n\nWe highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).\n\n## Documentation\n\nYou can find full documentation on [our dedicated documentation site](https://docs.spatie.be/laravel-prometheus).\n\n## Testing\n\nTo run the horizon collector tests you need to install the redis extension.\n\nOn Ubuntu you can do so with the following command:\n\n```bash\nsudo apt-get install php-redis\n```\n\nOn MacOS you can do so with the following command:\n\n```bash\npecl install redis\n```\n\nTo run the tests call `composer test`:\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Freek Van der Herten](https://github.com/freekmurze)\n- [All Contributors](../../contributors)\n\nThe Horizon collectors were heavily inspired on Lukas Kämmerling' excellent [laravel-horizon-prometheus-exporter](https://github.com/LKaemmerling/laravel-horizon-prometheus-exporter) package.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Flaravel-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatie%2Flaravel-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Flaravel-prometheus/lists"}