Download the PHP package cosmastech/laravel-wide-load without Composer

On this page you can find all versions of the php package cosmastech/laravel-wide-load. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-wide-load

Wide Load for Laravel

Wide event logging for Laravel — one log line for an entire request, packed with everything that happened.

Instead of scattering dozens of log lines throughout your request lifecycle, Wide Load collects key-value data as your application runs and emits a single, rich log entry when the request, artisan command, or job completes. This is the "wide event" or "canonical log line" pattern. For more details on the benefits of this approach, see loggingsucks.com.

Installation

The package auto-discovers its service provider — no manual registration needed.

Configuration

Publish the config file:

This creates config/wide-load.php with the following options:

Option Env Var Default Description
auto_report WIDE_LOAD_AUTO_REPORT true Toggle for automatic reporting. When false, lifecycle event-driven reporting is skipped. Manual calls to report() still work.
log_level WIDE_LOAD_LOG_LEVEL info Log level used by the default reporter.
log_message WIDE_LOAD_LOG_MESSAGE Request completed. Log message used by the default reporter.
serializable WIDE_LOAD_SERIALIZABLE true Carry wide load data across queued jobs via Laravel's Context serialization.

Enabling auto-reporting

By default, auto-reporting is enabled. You can disable it globally via the config, or toggle it at runtime on a per-request/job basis:

Since WideLoad is a scoped singleton, the auto-reporting flag resets between requests and queue jobs. This makes it safe to enable reporting in specific services without affecting other jobs processed by the same worker.

Usage

Via the Facade

The quickest way to add data from anywhere in your app:

Automatic reporting

Wide Load automatically calls report() and flush() on:

No manual reporting is needed in most cases if you have auto_report enabled.

Middleware

For more control over HTTP request reporting, you can register the terminable middleware:

When the middleware is registered, it will report and flush during the terminate phase. The Terminating event listener will automatically skip reporting if the middleware has already handled it, so there is no double-reporting.

Custom reporter

By default, Wide Load writes to the Laravel log. To send data somewhere else (a metrics service, a dedicated wide event store, etc.), register a custom callback in your AppServiceProvider:

Events

Wide Load dispatches events during the report() call that you can listen to:

Event Description
WideLoadReporting Dispatched when report() is called with data. The event contains the array $data being reported.
NoWideLoadToReport Dispatched when report() is called but there is no data to report.

License

MIT


All versions of laravel-wide-load with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^12.0 || ^13.0
illuminate/log Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cosmastech/laravel-wide-load contains the following files

Loading the files please wait ...