OpenTelemetry PHP

HttpEndpointResolver
in package
implements HttpEndpointResolverInterface

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

Tags
see
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#endpoint-urls-for-otlphttp

Table of Contents

Interfaces

HttpEndpointResolverInterface

Constants

DEFAULT_SCHEME  = 'https'
HOST_ATTRIBUTE  = 'host'
PASS_ATTRIBUTE  = 'pass'
PATH_ATTRIBUTE  = 'path'
PORT_ATTRIBUTE  = 'port'
ROOT_PATH  = '/'
SCHEME_ATTRIBUTE  = 'scheme'
USER_ATTRIBUTE  = 'user'

Properties

$httpFactoryResolver  : FactoryResolverInterface

Methods

__construct()  : mixed
create()  : self
resolve()  : UriInterface
resolveToString()  : string
addPort()  : UriInterface
addUserInfo()  : UriInterface
createDefaultUri()  : UriInterface
createUri()  : UriInterface
getDefaultPath()  : string
parseEndpoint()  : array<string|int, mixed>
resolvePath()  : string
validateScheme()  : void
validateSignal()  : void

Constants

Properties

Methods

resolve()

public resolve(string $endpoint, string $signal) : UriInterface
Parameters
$endpoint : string
$signal : string
Return values
UriInterface

resolveToString()

public resolveToString(string $endpoint, string $signal) : string
Parameters
$endpoint : string
$signal : string
Return values
string

addPort()

private static addPort(UriInterface $uri, array<string|int, mixed> $components) : UriInterface
Parameters
$uri : UriInterface
$components : array<string|int, mixed>
Return values
UriInterface

addUserInfo()

private static addUserInfo(UriInterface $uri, array<string|int, mixed> $components) : UriInterface
Parameters
$uri : UriInterface
$components : array<string|int, mixed>
Return values
UriInterface

createDefaultUri()

private createDefaultUri(array<string|int, mixed> $components, string $signal) : UriInterface
Parameters
$components : array<string|int, mixed>
$signal : string
Return values
UriInterface

getDefaultPath()

private static getDefaultPath(string $signal) : string
Parameters
$signal : string
Return values
string

parseEndpoint()

private static parseEndpoint(string $endpoint) : array<string|int, mixed>
Parameters
$endpoint : string
Return values
array<string|int, mixed>

resolvePath()

private static resolvePath(string $path, string $signal) : string
Parameters
$path : string
$signal : string
Return values
string

validateScheme()

private static validateScheme(string $protocol) : void
Parameters
$protocol : string

validateSignal()

private static validateSignal(string $signal) : void
Parameters
$signal : string

        
On this page

Search results