Home >Backend Development >PHP Tutorial >CodeIgniter Monitoring Library – Born from Understanding Real Developer Needs
I've just finished building the CodeIgniter monitoring package for Inspector APM.
Developing this monitoring library took considerable time, driven by a perceived gap in CodeIgniter framework monitoring solutions. The CodeIgniter community often gets overlooked by larger monitoring platforms.
Sentry, Bugsnag, and similar popular tools lack native CodeIgniter integration, creating challenges for developers. To address this, I've focused on building monitoring libraries for specialized frameworks like Symfony, CodeIgniter, and Slim.
While this might not appeal to large SaaS companies, it's a different story for us. As a bootstrapped startup with two partners, we have the freedom to develop niche products.
Operating from Southern Italy for five years, we've built Inspector from the ground up. After two years, Inspector gained traction, allowing us to delve deeper into specific technologies where robust solutions are lacking.
We've consistently rejected venture capital offers due to their emphasis on scaling for large corporations. Our goal remains assisting software developers with powerful, user-friendly tools. This approach has fueled our steady growth over the past five years.
It's been incredibly rewarding to support developers worldwide (U.S., Australia, Argentina, Kenya, Singapore, Germany, etc.).
The Inspector package for CodeIgniter aims to provide a seamless monitoring solution for CodeIgniter developers, eliminating the need for manual library integration or complex configurations.
The package prioritizes developer experience. As with any CodeIgniter project, improvements are always welcome. Please share your feedback or submit issues via the GitHub repository.
Let's get started!
Install the latest version using Composer:
<code>composer require inspector-apm/inspector-codeigniter</code>
Then, run the installation command to publish the Inspector.php
configuration file to your application's app/Config
directory:
<code>php spark inspector:install</code>
Enable data transfer to your Inspector dashboard by adding the following environment variable to your .env
file. Obtain a new Ingestion Key by creating a new application in your account: https://www.php.cn/link/23d6c2965508b167da9c4bdcef3a2aa3
<code>#-------------------------------------------------------------------- # INSPECTOR #-------------------------------------------------------------------- inspector.ingestionKey = '974yn8c34ync8xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'</code>
Verify your configuration:
<code>php spark inspector:test</code>
A successful check indicates readiness for production deployment.
Inspector's default monitoring features include:
For global accessibility, add the helper to your Config/Autoload.php
:
<code>composer require inspector-apm/inspector-codeigniter</code>
This helper provides shortcuts for monitoring custom code blocks or manually reporting exceptions:
<code>php spark inspector:install</code>
Learn more about custom segments: https://www.php.cn/link/e1241d1b9692c1e9f4ebbf6896f0e33e
Unhandled exceptions are automatically reported for real-time error alerts. Inspector supports various notification channels (Email, Slack, Telegram, Discord, etc.) for integration with your preferred communication platform.
You can manually report exceptions without halting code execution:
<code>#-------------------------------------------------------------------- # INSPECTOR #-------------------------------------------------------------------- inspector.ingestionKey = '974yn8c34ync8xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'</code>
Real-time alerts and stack trace analysis facilitate quick issue identification.
Inspector offers free HTTP monitoring, database query analysis, error detection, and customizable alerts. Our first-party library ensures a fully featured, zero-configuration experience.
Learn more: https://www.php.cn/link/3a78f1864ab77dbd239fbe33cae90bbb
The above is the detailed content of CodeIgniter Monitoring Library – Born from Understanding Real Developer Needs. For more information, please follow other related articles on the PHP Chinese website!