Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

OtlpHttpTransportFactory.php

Namespace

OpenTelemetry\Contrib\Otlp

File

vendor/open-telemetry/exporter-otlp/OtlpHttpTransportFactory.php

View source
<?php

declare (strict_types=1);
namespace OpenTelemetry\Contrib\Otlp;

use OpenTelemetry\SDK\Common\Export\Http\PsrTransport;
use OpenTelemetry\SDK\Common\Export\Http\PsrTransportFactory;
use OpenTelemetry\SDK\Common\Export\TransportFactoryInterface;
class OtlpHttpTransportFactory implements TransportFactoryInterface {
    private const DEFAULT_COMPRESSION = 'none';
    public function create(string $endpoint, string $contentType, array $headers = [], $compression = null, float $timeout = 10.0, int $retryDelay = 100, int $maxRetries = 3, ?string $cacert = null, ?string $cert = null, ?string $key = null) : PsrTransport {
        if ($compression === self::DEFAULT_COMPRESSION) {
            $compression = null;
        }
        return (new PsrTransportFactory())->create($endpoint, $contentType, $headers, $compression, $timeout, $retryDelay, $maxRetries, $cacert, $cert, $key);
    }

}

Classes

Title Deprecated Summary
OtlpHttpTransportFactory

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal