Download the PHP package edwinekr/otel-elk-laravel without Composer

On this page you can find all versions of the php package edwinekr/otel-elk-laravel. 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 otel-elk-laravel

OpenTelemetry ELK Laravel

Latest Version on Packagist Total Downloads

OpenTelemetry activity logging integration with ELK Stack (Elasticsearch, Logstash, Kibana) for Laravel applications.

Architecture

Features

Requirements

Installation

Install the package via Composer:

The package will auto-register its service provider.

Publish Configuration

This will create config/activity_log.php in your application.

Configuration

Add the following to your .env file:

Usage

Automatic HTTP Request Logging

All HTTP requests are automatically logged when the middleware is enabled. No additional code required!

Manual Activity Logging

Use the ActivityLog facade or inject ActivityLogService:

Using Dependency Injection

Model Activity Logging

Use the LogsActivity trait on your Eloquent models:

You can also log custom activities on a model:

Authentication Events

Authentication events are automatically logged when enabled. These events are tracked:

Real User Monitoring (RUM)

This package includes Elastic APM RUM (Real User Monitoring) support for browser-side performance monitoring and error tracking.

RUM Configuration

Add the following to your .env file:

Using the RUM Blade Component

Add the RUM script to your layout file (before closing </head> tag):

The component will only render when RUM is enabled (ELASTIC_APM_RUM_ENABLED=true) and a valid server URL is configured.

Using the RUM Facade

For more control, use the Rum facade:

Using the RUM Helper

You can also use the helper class directly:

Distributed Tracing Origins

To enable distributed tracing between frontend and backend, configure the origins in config/activity_log.php:

Publishing RUM Views

To customize the RUM script template:

This will publish the views to resources/views/vendor/otel-elk/.

Using Session-Based User Resolver

If your application uses session-based authentication instead of Laravel's built-in auth:

Make sure your session contains user data:

Manual Middleware Registration

If you prefer to register the middleware manually, disable auto-registration:

Then register it in your routes or kernel:

Or for Laravel 11+ in bootstrap/app.php:

Excluding Paths and Methods

Configure excluded paths in config/activity_log.php:

Sensitive Fields

Sensitive fields are automatically masked in request body logs:

Logstash Configuration

Example Logstash configuration for receiving logs:

Kibana Visualization

After logs are ingested, you can create visualizations in Kibana:

  1. Go to Kibana → Maps
  2. Click Add layer → Documents
  3. Select your index pattern activity-logs-*
  4. Choose geoip.location as the geospatial field
  5. Configure tooltips to show: ip, user_email, action, path

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of otel-elk-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^8.0|^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.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 edwinekr/otel-elk-laravel contains the following files

Loading the files please wait ...