{"id":16461874,"url":"https://github.com/thomasjohnkane/slow-query-notifier","last_synced_at":"2025-03-16T18:31:24.618Z","repository":{"id":49082619,"uuid":"237683684","full_name":"thomasjohnkane/slow-query-notifier","owner":"thomasjohnkane","description":"Get notified if your Laravel app ever runs a really slow database query","archived":false,"fork":false,"pushed_at":"2023-02-02T11:00:50.000Z","size":179,"stargazers_count":96,"open_issues_count":7,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T08:11:44.861Z","etag":null,"topics":["database-query-monitoring","laravel","performance-monitoring"],"latest_commit_sha":null,"homepage":"","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/thomasjohnkane.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-01T21:58:25.000Z","updated_at":"2024-05-26T09:50:11.000Z","dependencies_parsed_at":"2023-02-17T18:46:06.899Z","dependency_job_id":null,"html_url":"https://github.com/thomasjohnkane/slow-query-notifier","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasjohnkane%2Fslow-query-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasjohnkane%2Fslow-query-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasjohnkane%2Fslow-query-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasjohnkane%2Fslow-query-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasjohnkane","download_url":"https://codeload.github.com/thomasjohnkane/slow-query-notifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826788,"owners_count":20354220,"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":["database-query-monitoring","laravel","performance-monitoring"],"created_at":"2024-10-11T11:09:43.033Z","updated_at":"2025-03-16T18:31:23.868Z","avatar_url":"https://github.com/thomasjohnkane.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slow Query Notifier for Laravel\n\n\u003c!-- [![Latest Version on Packagist](https://img.shields.io/packagist/v/thomasjohnkane/slow-query-notifier.svg?style=flat-square)](https://packagist.org/packages/thomasjohnkane/slow-query-notifier) --\u003e\n\nGet notified if your app ever runs a really slow database query. We set a default threshold, but you can configure it based on your needs \u0026 expectations.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require thomasjohnkane/slow-query-notifier\n```\n## Usage\n### Set an email address\n```php\n// app/Providers/AppServiceProvider.php\n\nuse SlowQueryNotifier\\SlowQueryNotifierFacade as SlowQueryNotifier;\n\npublic function boot()\n{\n    SlowQueryNotifier::toEmail('admin@example.com');\n}\n```\n### Test it works (in Production)\nIf you are using this in production (as intendend) make sure it is working correctly:\n```bash\nphp artisan sqn:test\n```\nThis command will test two things:\n\n- We can detect slow queries in your app\n- We can send an email to you if a slow query runs\n\n## Configuration\n\nIn general, we setup all of the configuration for you with sensible defaults. However, you can change the default settings if you'd like. To learn why we chose these defaults, \u003ca href=\"#\"\u003eread the blog post\u003c/a\u003e.\n\n### Threshold\n\nThe default is 99ms. Set a different `threshold` in milliseconds in your configuration:\n```php\nSlowQueryNotifier::threshold(200)-\u003etoEmail('admin@example.com');\n```\n### Enable/Disable\n\nThe package is enabled by default. Set this value to `false` in your `.env` to bypass the listener.\n```bash\nSLOW_QUERY_NOTIFIER_ENABLED=false\n```\n## Testing\n\n``` bash\nphpunit\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email thomasjohnkane@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Thomas Kane](https://github.com/thomasjohnkane)\n- Thanks to Marcel Pociot for the original inspiration\n- Thanks to Caleb Porzio for the guidance\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Laravel Package Boilerplate\n\nThis package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasjohnkane%2Fslow-query-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasjohnkane%2Fslow-query-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasjohnkane%2Fslow-query-notifier/lists"}