定制 nivseb/lara-monitor 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nivseb/lara-monitor

Composer 安装命令:

composer require nivseb/lara-monitor

包简介

APM agent for laravel projects to monitor the application with elastic apm tools.

README 文档

README

Tests Supported PHP Version Latest Stable Version Total Downloads

Lara-Monitor is apm agent package for application that are build with Laravel Framework. The collected data are send to your Elastic APM Server. That allow you an impressive look to your application via kibana. This package make it easy to connect all needed information from your application in Elastic Kibana. This package was developed primarily for container-based environments that use Laravel Octane. But it works fine in over environments like plain laravel application as docker container or hostet plain on servers.

Lara-Monitor collect information directly from laravel events and callbacks. That allows a very easy integration, but Lara-Monitor is also designed to be especially customizable, so that you can build that monitoring that is the best for your application.

Feature

Read more about the collecting process:

At the moment the only agent that is supported, sends the collected data to the Elastic APM Server. In the feature it would be extended with other agents, or you can build your ownagent. Read more about the elastic agent.

Octane Support

The request handling in application that use Laravel Octane, is a little different to normal laravel request handling. This makes it necessary to collect data for the apm on another way, to get a good look at the performance monitoring.

Only the task worker are not supported. Everything that is done in a task worker will not see in the collected data.

Customizability

All parts are only connected via interfaces, that allows you easily to customize the agent for your requirements. Overwrite the part of the agent, that need to be changed and register your variant. If you think that this also help others, create a pull request and make it possible for everyone to get advantage of it.

Installation

  1. To install Lara-Monitor you can easily use composer.

    composer require nivseb/lara-monitor
  2. Add Nivseb\LaraMonitor\Providers\LaraMonitorStartServiceProvider to your application

  3. Add Nivseb\LaraMonitor\Providers\LaraMonitorEndServiceProvider to your application

  4. Publish and change config or add needed environment variables

The provider should be added manuale to the loaded service provider. This allows you to get the best information from the tracking. The LaraMonitorStartServiceProvider Should be loaded as early as possible and the LaraMonitorEndServiceProvider should be loaded as late as possible. That include as much as possible other event listeners to monitored for the spans.

Configuration

Lara-Monitor comes with an own config, you can publish it with the following command.

php artisan vendor:publish --tag=lara-monitor-config

The most configs are set by default laravel environment variables (e.g. APP_NAME or APP_ENV). For a full documentation see the Configuration.

nivseb/lara-monitor 适用场景与选型建议

nivseb/lara-monitor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.47k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2024 年 12 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「monitoring」 「laravel」 「elastic」 「apm」 「octane」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 nivseb/lara-monitor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 nivseb/lara-monitor 我们能提供哪些服务?
定制开发 / 二次开发

基于 nivseb/lara-monitor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.47k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-31