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

Breadcrumb

  1. Drupal Core 11.1.x
  2. HttpEndpointResolver.php

function HttpEndpointResolver::parseEndpoint

1 call to HttpEndpointResolver::parseEndpoint()
HttpEndpointResolver::resolve in vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php

File

vendor/open-telemetry/exporter-otlp/HttpEndpointResolver.php, line 97

Class

HttpEndpointResolver
Resolves non-signal-specific OTLP HTTP endpoints to signal-specific ones according to the specification.

Namespace

OpenTelemetry\Contrib\Otlp

Code

private static function parseEndpoint(string $endpoint) : array {
    $result = parse_url($endpoint);
    if (!is_array($result) || !isset($result[self::HOST_ATTRIBUTE])) {
        throw new InvalidArgumentException(sprintf('Failed to parse endpoint "%s"', $endpoint));
    }
    return $result;
}

API Navigation

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