rahimi-ali/pulse-slow-mongo-queries
最新稳定版本:1.0.0
Composer 安装命令:
composer require rahimi-ali/pulse-slow-mongo-queries
包简介
A Laravel Pulse card for slow MongoDB queries
README 文档
README
Slow queries card for Laravel Pulse just for MongoDB. This package does not assume you use any specific library, the only requirement is that you should add a subscriber to the MongoDB client class used by your application to connect to mongo and run commands.
Installation
Install using Composer:
composer require rahimi-ali/pulse-slow-mongo-queries
Usage
Add the MongoCommandSubscriber to your mongoDB client:
$client = new Client('connection string', []); $client->getManager()->addSubscriber(new \RahimiAli\Pulse\SlowMongoQueries\Util\MongoSubscriber());
Add the recorder to the config/pulse.php configuration file:
'recorders' => [ // ... \RahimiAli\Pulse\SlowMongoQueries\Recorder\SlowMongoQueriesRecorder::class => [ 'threshold' => 100_000, // in microseconds 'sample_rate' => 1, // between 0 and 1 ] ]
Add the card to your pulse dashboard:
<x-pulse> <livewire:pulse.servers cols="full" /> <livewire:pulse.usage cols="4" rows="3" /> <livewire:pulse.queues cols="4" /> <livewire:pulse.cache cols="4" /> <livewire:pulse.slow-queries cols="8" /> <livewire:slow-mongo-queries cols="8" /> {{-- this is rendered under the slow queries card --}} <livewire:pulse.exceptions cols="6" /> <livewire:pulse.slow-requests cols="6" /> <livewire:pulse.slow-jobs cols="6" /> <livewire:pulse.slow-outgoing-requests cols="6" /> </x-pulse>
统计信息
- 总下载量: 4.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-29