chris-ware/pulse-health-check
Composer 安装命令:
composer require chris-ware/pulse-health-check
包简介
Combine the power of Laravel Pulse with Spatie's Health Checks
README 文档
README
Combine the power of Laravel Pulse with Spatie's Health Checks
Installation
You can install the package via composer:
composer require chris-ware/pulse-health-check
Usage
Cache Hit Ratio Check
This check will warn or fail if the cache hit ratio hits a certain percentage threshold. By default, it will fail at 10% hit ratio and warn at 25%.
use ChrisWare\PulseHealthCheck\Checks\PulseCacheHitRatioCheck; PulseCacheHitRatioCheck::new();
Configure the failure and warning levels:
use ChrisWare\PulseHealthCheck\Checks\PulseCacheHitRatioCheck; PulseCacheHitRatioCheck::new()->failWhenSizeRatioBelow(25)->warnWhenSizeRatioBelow(50);
Generic Check
This generic check will accommodate most basic circumstances for Pulse aggregates. Every check must have a defined for method on it for it to understand which aggregate type to use.
Example for slow query aggregation:
use ChrisWare\PulseHealthCheck\Checks\PulseCheck; PulseCheck::new() ->for('slow_query') ->failWhenAbove(5) ->warnWhenAbove(3) ->interval(\Carbon\CarbonInterval::minutes(5));
Example for user request aggregation:
use ChrisWare\PulseHealthCheck\Checks\PulseCheck; PulseCheck::new() ->for('user_request') ->aggregate('count') ->failWhenAbove(500) ->warnWhenAbove(300) ->interval(\Carbon\CarbonInterval::minutes(5));
Available methods
for: Determine the aggregation type to use
aggregate: Determine the aggregation value to use (defaults to max)
failWhenAbove: Set the value to fail if greater than or equal to
failWhenBelow: Set the value to fail if less than or equal to
warnWhenAbove: Set the value to warn if greater than or equal to
warnWhenBelow: Set the value to warn if less than or equal to
interval: The CarbonInterval for aggregations to be evaluated (defaults to 1 hour)
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
chris-ware/pulse-health-check 适用场景与选型建议
chris-ware/pulse-health-check 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 472 次下载、GitHub Stars 达 5, 最近一次更新时间为 2023 年 12 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「Chris Ware」 「pulse-health-check」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 chris-ware/pulse-health-check 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 chris-ware/pulse-health-check 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 chris-ware/pulse-health-check 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
DocuWare integration with Laravel
Laravel package that provides a simple facade to the USPS Addresses API
Provides an interface to Athena EHR's API
Alfabank REST API integration
Oracle HCM Laravel SDK
Provides user level tenant tokens / scoped search keys.
统计信息
- 总下载量: 472
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-12