flow php

UNIFIED DATA PROCESSING FRAMEWORK

composer require flow-php/etl ~0.30.0

ChangelogRelease Cycle

play Try Flow Online

elephant
extract

Extracts

Read from various data sources.

arrow
transform

Transforms

Shape and optimize for your needs.

arrow
load

Loads

Store and secure in one of many available data sinks.


Definition


/**
 * Create an async curl transport for OTLP endpoints.
 *
 * Creates a CurlTransport that uses curl_multi for non-blocking I/O.
 * Unlike HttpTransport (PSR-18), this transport queues requests and executes
 * them asynchronously. Completed requests are processed on subsequent send()
 * calls or on shutdown().
 *
 * Requires: ext-curl PHP extension
 *
 * Example usage:
 * ```php
 * // JSON over HTTP (async) with default options
 * $transport = otlp_curl_transport(
 *     endpoint: 'http://localhost:4318',
 *     serializer: otlp_json_serializer(),
 * );
 *
 * // Protobuf over HTTP (async) with custom options
 * $transport = otlp_curl_transport(
 *     endpoint: 'http://localhost:4318',
 *     serializer: otlp_protobuf_serializer(),
 *     options: otlp_curl_options()
 *         ->withTimeout(60)
 *         ->withHeader('Authorization', 'Bearer token')
 *         ->withCompression(),
 * );
 * ```
 *
 * @param string $endpoint OTLP endpoint URL (e.g., 'http://localhost:4318')
 * @param Serializer $serializer Serializer for encoding telemetry data (JSON or Protobuf)
 * @param CurlTransportOptions $options Transport configuration options
 */
otlp_curl_transport(string $endpoint, Serializer $serializer, CurlTransportOptions $options) : CurlTransport

Contributors

Join us on GitHub external resource
scroll back to top