PHP code example of vulqen / php-sdk
1. Go to this page and download the library: Download vulqen/php-sdk 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/ */
vulqen / php-sdk example snippets
use Vulqen\Sdk\Client;
use Vulqen\Sdk\Options;
$client = new Client(new Options(
dsn: getenv('VULQEN_DSN') ?: null,
environment: 'prod',
release: getenv('VULQEN_RELEASE') ?: null,
projectRoot: __DIR__,
));
$transaction = $client->startTransaction('app_order_show', 'http.server');
$span = $client->startSpan('db.query', 'SELECT * FROM orders WHERE id = ?', ['db.system' => 'mysql']);
$client->finishSpan($span);
$transaction?->setHttpStatus(200);
$client->finishTransaction();
$client->flush();