otlp_curl_transport
Definition
/**
* Create an async curl transport for OTLP endpoints.
*
* Creates a CurlTransport that uses curl_multi for non-blocking I/O.
* Requests are queued and executed asynchronously. OTLP/HTTP allows JSON
* or Protobuf encoding; defaults to JSON.
*
* Requires: ext-curl PHP extension
*
* @param string $endpoint OTLP endpoint URL (e.g., 'http://localhost:4318')
* @param JsonSerializer|ProtobufSerializer $serializer Serializer for encoding telemetry data (JSON or Protobuf)
* @param CurlTransportOptions $options Transport configuration options
* @param ?Transport $failover Optional failover transport receiving prior batches when primary fails
*/
otlp_curl_transport(string $endpoint, JsonSerializer|ProtobufSerializer $serializer, CurlTransportOptions $options, ?Transport $failover) : Transport