PHP code example of open-telemetry / opentelemetry-auto-curl

1. Go to this page and download the library: Download open-telemetry/opentelemetry-auto-curl 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/ */

    

open-telemetry / opentelemetry-auto-curl example snippets

shell
OTEL_PHP_DISABLED_INSTRUMENTATIONS=curl
bash
OTEL_PHP_INSTRUMENTATION_HTTP_RESPONSE_HEADERS=content-type,server
OTEL_PHP_INSTRUMENTATION_HTTP_REQUEST_HEADERS=host,accept
ini
OTEL_PHP_INSTRUMENTATION_HTTP_RESPONSE_HEADERS=content-type,server
; or
otel.instrumentation.http.response_headers[]=content-type
otel.instrumentation.http.response_headers[]=server
ini
OTEL_PHP_INSTRUMENTATION_HTTP_REQUEST_HEADERS=host,accept
; or
otel.instrumentation.http.request_headers[]=host
otel.instrumentation.http.request_headers[]=accept