[Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 |
I make this cause I can not find anything related into the forums and I have to get it working on my own, found several questions on how to do it but no one answers and theres no much information about in CI4 just the CI3.
Feel free to improve my answer, is just to help new ones. There will be some previous steps recomended. 1.- Use composer to install CI4. Code: composer create-project codeigniter4/appstarter yourproject 2.- Use composer for install the Sentry SDK or Bugsnag Code: composer require sentry/sdk:2.1.0 3.- Check in your php.ini the following: - tmp directory must be writtable for CURL (even in windows i use a folder into my project) - in Windows ca_bundle installed download latest file from https://curl.haxx.se/docs/caextract.html and add to php.ini: Code: [curl] 4.- You are ready to go into our project files, I think the best way to integrate must be with events so let go to edit the Events.php with the following: Sentry: Code: Events::on('post_controller_constructor', function () { Code: Events::on('post_controller_constructor', function () { 5.- Test IT!!! it just works!!! |
Messages In This Thread |
[Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 - by napa - 05-02-2020, 12:31 PM
RE: [Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 - by Tor2r - 06-26-2021, 11:58 AM
RE: [Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 - by paulmartinez - 07-21-2021, 08:39 AM
RE: [Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 - by zakirs - 06-11-2022, 03:13 AM
RE: [Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 - by Tor2r - 08-22-2022, 02:02 PM
RE: [Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 - by ToddGuy - 10-31-2022, 05:30 AM
RE: [Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 - by IvanRog - 08-16-2023, 07:25 AM
RE: [Quick Tutorial] - Integration of Sentry or Bugsnag With CI4 - by dioncodes - 09-14-2022, 04:41 AM
|