M
M
microbot2020-11-02 15:04:05
Laravel
microbot, 2020-11-02 15:04:05

How to monitor data processing in Laravel?

Good day to all! There is any Laravel web application and they write to the database, to files, convert them, issue them to the client, etc. In order to see in a week how this or that object was processed or why the file was not written to, you can set up logging before each line. But this process is quite laborious and practically does not make sense, since such a setting takes a lot of time and effort, in some cases it is easier to put up with the inaccuracy of the system than to debug it. Moreover, no errors occur, just in some places the logic may work out differently than it was intended.
How, after all, to set up monitoring of the system state and, if necessary, view the entire processing path of any taken object or function call? Maybe there are already some ready-made solutions?
PS I looked at the sentry.io solution, but it does not solve the problem, since only errors are logged. If not, please indicate where to look.
Thanks in advance to everyone for the replies!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
microbot, 2021-03-14
@microbot

It turns out there is a standard Laravel Telescope package . Everything is recorded in general, the recommendation even says to clear the database from overflow at least once a day (it all depends on how big the project is).

F
FanatPHP, 2020-11-02
@FanatPHP

You add a middleware, in which you wrap all the requests, and in it you already log everything you want .
Here is a simple example

P
pLavrenov, 2020-11-03
@pLavrenov

You can log anything and when you need it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question