PHP code example of logtide / logtide-wordpress

1. Go to this page and download the library: Download logtide/logtide-wordpress 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/ */

    

logtide / logtide-wordpress example snippets


use LogTide\WordPress\LogtideWordPress;

LogtideWordPress::init([
    'dsn' => 'https://[email protected]',
    'service' => 'my-wordpress-site',
    'environment' => 'production',
]);

LogtideWordPress::init([
    'api_url' => 'https://your-logtide-instance.com',
    'api_key' => 'lp_your_key',
    'service' => 'my-wordpress-site',
]);

LogtideWordPress::init([
    'dsn' => '...',
    'service' => 'my-site',
    'slow_query_threshold_ms' => 200.0, // flag queries slower than 200ms
]);