PHP code example of kronn / observability
1. Go to this page and download the library: Download kronn/observability library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kronn / observability example snippets
use Kronn\Observability\Facades\Telemetry;
Telemetry::user(fn ($user) => ['id' => $user->id, 'name' => $user->name]);
Telemetry::tag(['tenant' => 'acme', 'feature' => 'new-checkout']);
Telemetry::extra(['cart_size' => 12]);
Telemetry::report($exception); // manually report an exception
xml
<env name="KRONN_TRANSPORT" value="null"/>
bash
php artisan vendor:publish --tag=observability-config