trustportidentity / beacon-laravel
Official TrustPort Beacon APM and Telemetry SDK for Laravel
Package info
github.com/trustportidentity/beacon-laravel
pkg:composer/trustportidentity/beacon-laravel
Requires
- php: ^8.2
- ext-curl: *
- illuminate/http: ^10.0 || ^11.0 || ^12.0
- illuminate/support: ^10.0 || ^11.0 || ^12.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-28 06:46:50 UTC
README
Official TrustPort Beacon APM SDK for Laravel.
Install
composer require trustportidentity/beacon-laravel
Package discovery auto-registers BeaconServiceProvider and the Beacon facade.
Configure
BEACON_INGEST_URL=https://beacon-api.trustportidentity.com BEACON_API_KEY=tb_live_your_tenant_key BEACON_SERVICE_NAME=billing-api BEACON_ENVIRONMENT=production
Register the middleware
// app/Http/Kernel.php use TrustPortIdentity\Beacon\BeaconMiddleware; protected $middleware = [ BeaconMiddleware::class, ];
Custom spans
use TrustPortIdentity\Beacon\Beacon; $span = Beacon::span('db.mysql.select_invoices', 'database'); $invoices = Invoice::where('status', 'pending')->get(); $span->setTag('rows', $invoices->count())->end();
Controlling ingest volume
Every trace is already batched (BEACON_BATCH_SIZE) instead of one network call per
request. In high-traffic services, also set BEACON_SAMPLE_RATE (0.0–1.0, default 1.0) to
trace only a fraction of requests — this is what actually keeps you inside your plan's
monthly quota. Exceptions are always sent regardless of sampling.
BEACON_SAMPLE_RATE=0.2
See the full guide at beacon.trustportidentity.com/help/laravel.