Laravel::trackYourApp
Know Your App

Laravel::trackYourApp

Plan

  • Intro
  • Logging: add metadata to your logs
  • Sentry: track your exceptions and data


Hello and welcome!

My name is Vadym and I love laravel development and good apps built with it.

In this short article series, we are going to describe some problems mid-to-big apps are facing.

Laravel has tons of tools in order to build your App fast, as it is a RAD framework.

However, a RAD not means 100% boxed for specific needs.

From time to time you need to create custom solutions.

When you are working for some time in web development - you will realize that different projects may have the same problems.

We are going to talk about tracking.


Tools available for tracking:

  • Logging
  • Telescope
  • Horizon


Logging

To help you learn more about what's happening within your application, Laravel provides robust logging services that allow you to log messages to files, the system error log, and even to Slack to notify your entire team.

Logging is the basic and the most common tool to track your app. However, it faces problems when logging into server files is not suitable. E.g. when we are talking about load balancing - we just cannot log to file. Files are different on each of the servers.

Solution:

Use 3rd party logs storage that consumes logs from your app and stores them somewhere else (E.g. AWS CloudWatch).


Telescope

Telescope makes a wonderful companion to your local Laravel development environment. Telescope provides insight into the requests coming into your application, exceptions, log entries, database queries, queued jobs, mail, notifications, cache operations, scheduled tasks, variable dumps, and more.

Telescope is applicable only for local development, but it provides complex reports on what happening with your app in each context. But it`s too heavy for production, because it proxies each pipe through its code, so that code becomes slower.

Solution:

Use only on the local machine. Move to the require-dev section and not install on the production env.


Horizon

Laravel Horizon provides a beautiful dashboard and code-driven configuration for your Laravel powered?Redis queues. Horizon allows you to easily monitor key metrics of your queue system such as job throughput, runtime, and job failures.

Horizon is a production-ready system that allows you to track your queues and display some visual feedback on what’s happening in your app.

The great feature of the horizon is the queue worker balancing. It works like a charm when you have tons of jobs to be processed.

Solutions:

No problem - no solution.

Horizon does exactly what is it created for.


To be continued...

Next time we will talk about logging in-depth.


Tags

#laravel #webdevelopment #php #webanalytics #software

要查看或添加评论,请登录

Mark P.的更多文章

  • Laravel::trackYourApp

    Laravel::trackYourApp

    Plan Intro Logging: add metadata to your logs Sentry: track your exceptions and data Hello and welcome! My name is…

社区洞察

其他会员也浏览了