PHP code example of krzysztofzylka / open-observe

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

    

krzysztofzylka / open-observe example snippets


\Krzysztofzylka\OpenObserve\OpenObserve::$USERNAME = '';
\Krzysztofzylka\OpenObserve\OpenObserve::$PASSWORD = '';
\Krzysztofzylka\OpenObserve\OpenObserve::$HOST = 'http://127.0.0.1:5080';
\Krzysztofzylka\OpenObserve\OpenObserve::$STREAM = 'default';
\Krzysztofzylka\OpenObserve\OpenObserve::$ORGANIZATION = 'default';
\Krzysztofzylka\OpenObserve\OpenObserve::$SSLVERIFYPEER = false;

public static function send(
    string $message,
    string $level = 'INFO',
    array $data = []
)

\Krzysztofzylka\OpenObserve\OpenObserve::send(
    'message',
    'INFO',
    ['additional' => 'data']
)