1. Go to this page and download the library: Download uptimex/laravel-client 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/ */
uptimex / laravel-client example snippets
use Uptimex\Client\Facades\Uptimex;
Uptimex::sample(1.0); // capture this whole trace regardless of the rate
use Uptimex\Client\Facades\Uptimex;
public function boot(): void
{
Uptimex::rejectQueries(fn (array $q) =>
str_contains($q['sql_normalized'] ?? '', 'telescope_')
);
Uptimex::rejectCacheKeys(fn (array $c) =>
str_starts_with($c['key'] ?? '', 'framework/')
);
}
use Uptimex\Client\Facades\Uptimex;
// Start a trace manually (custom long-running scripts, workers, …)
Uptimex::startTrace('command', ['source' => 'cron-cleanup']);
// Record a custom event under the active trace
Uptimex::record('request', ['route' => '/checkout', 'duration_ms' => 42]);
// Run a block with capture paused
Uptimex::ignore(function () {
// the SDK is silent inside this closure
});
// …or pause / resume manually
Uptimex::pause();
// noisy section
Uptimex::resume();
// End the trace and flush its batch
Uptimex::endTrace('ok');