Download the PHP package palzin-apm/palzin-codeigniter without Composer
On this page you can find all versions of the php package palzin-apm/palzin-codeigniter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download palzin-apm/palzin-codeigniter
More information about palzin-apm/palzin-codeigniter
Files in palzin-apm/palzin-codeigniter
Package palzin-codeigniter
Short Description Real-Time monitoring Codeigniter package using Palzin Monitor (APM).
License MIT
Informations about the package palzin-codeigniter
Real-Time monitoring package using Palzin Monitor (APM)
Palzin Monitor offers real-time performance monitoring capabilities that allow you to effectively monitor and analyze the performance of your applications. With Palzin Monitor, you can capture and track all requests without the need for any code modifications. This feature enables you to gain valuable insights into the impact of your methods, database statements, and external requests on the overall user experience.
Getting Started
To quickly get started with Palzin Monitor (APM) in CodeIgniter, follow these steps:
- Install the package using Composer by running the following command:
composer require palzin-apm/palzin-codeigniter
. - Create a new configuration class in your CodeIgniter project.
- Copy the provided class from below and paste it into your newly created configuration class.
Palzin CodeIgniter
is a convenient wrapper around the Palzin Monitor (APM) PHP monitor library, designed specifically for CodeIgniter4 applications.
It simplifies the process of monitoring your code by offering automated inspection functionality without requiring additional code from you.
The library is highly flexible and allows you to customize the automated inspection feature to suit your needs. You have the power to define your own inspection points, giving you greater control over the monitoring process. Palzin CodeIgniter can be used in various components of your application, including Controllers, Models, Events, Libraries, and custom classes. As long as the code has access to CodeIgniter4's services, you can leverage the capabilities of this library.
Installation
Palzin CodeIgniter can be easily installed via Composer, leveraging CodeIgniter4's autoloading feature. Simply run the following command:
Alternatively, you can manually install the library by downloading the source files and adding the directory to the app/Config/Autoload.php
file.
Setup
In order to start using the integration library, you will need to create a config class for it.
> ./spark make:config Palzin
Usage
To use the Palzin Monitor library integration use the palzin
service.
With AutoInspect set to true, you don't need to do anything else, your application will start being inspected
automatically, this is made possible by the use of CI4 events functionality in the post_controller_constructor
the code will start a segment, providing the controller as the title and the method name as the label.
Then in the post_system
it will end the segment, which means from the start of the incoming request till result
delivery, your code paths will be 'tracked' and the results submitted to palzin.app. And that's it.
You may however need finer grained control over your code points and maybe need to access other more powerful Palzin Monitor (APM) functionality, and this is where the service comes in. Here we present just a few useful methods, check the Palzin Monitor (APM) documentation for more methods and features.
You can add a segment from anywhere in your code (assuming this is in your controller method getUsers):
You can report an exception from anywhere in your code as well (assuming this is your model method, where you validate stuff).
Using the Helper
To use the helper, you need to load it first using the helper() method. You can do this in your code by calling the helper() method and passing the helper name as an argument. Another option is to configure your BaseController to always load the helper.
Note: Due to the shorthand nature of the helper function it can only add a segment or return a service instance.
Official documentation
Check out the official documentation
LICENSE
This package is licensed under the MIT license.