open-telemetry/opentelemetry-auto-curl

OpenTelemetry auto-instrumentation for curl

dev-main 2024-10-30 13:03 UTC

This package is auto-updated.

Last update: 2024-10-30 13:06:12 UTC


README

Releases Issues Source Mirror Latest Version Stable

This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.

OpenTelemetry curl auto-instrumentation

Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to install and configure the extension and SDK.

Overview

Auto-instrumentation hooks are registered via composer, and client kind spans will automatically be created when calling curl_exec or curl_multi_exec functions.

Limitations

The curl_multi instrumentation is not resilient to shortcomings in the application and requires proper implementation. If the application does not call the curl_multi_info_read function, the instrumentation will be unable to measure the execution time for individual requests-time will be aggregated for all transfers. Similarly, error detection will be impacted, as the error code information will be missing in this case. In case of encountered issues, it is recommended to review the application code and adjust it to match example #1 provided in curl_multi_exec documentation.

Configuration

The extension can be disabled via runtime configuration:

OTEL_PHP_DISABLED_INSTRUMENTATIONS=curl