centrex/laravel-telemetry

Add Open Telemetry support to Laravel.

v0.0.1 2024-02-04 08:08 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Contents

Installation

You can install the package via composer:

composer require centrex/laravel-telemetry

You can publish the config file with:

php artisan vendor:publish --tag="laravel-telemetry-config"

This is the contents of the published config file:

return [
];

You can publish and run the migrations with:

php artisan vendor:publish --tag="laravel-telemetry-migrations"
php artisan migrate

Optionally, you can publish the views using

php artisan vendor:publish --tag="laravel-telemetry-views"

Usage

This package will work out of the box with a default OTLP exporter configuration.

The default port is 4318, and requests will be sent to http://localhost:4318.

Testing

🧹 Keep a modern codebase with Pint:

composer lint

✅ Run refactors using Rector

composer refacto

⚗️ Run static analysis using PHPStan:

composer test:types

✅ Run unit tests using PEST

composer test:unit

🚀 Run the entire test suite:

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Credits

License

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