OpenTelemetry PHP

Registry
in package

A registry to enable central registration of components that the SDK requires but which may be provided by non-SDK modules, such as contrib and extension.

Tags
todo

[breaking] deprecate this mechanism of setting up components, in favor of using SPI.

Table of Contents

Properties

$logRecordExporterFactories  : array<string|int, mixed>
$metricExporterFactories  : array<string|int, mixed>
$resourceDetectors  : array<string|int, mixed>
$spanExporterFactories  : array<string|int, mixed>
$textMapPropagators  : array<string|int, mixed>
$transportFactories  : array<string|int, mixed>

Methods

logRecordExporterFactory()  : LogRecordExporterFactoryInterface
metricExporterFactory()  : MetricExporterFactoryInterface
registerLogRecordExporterFactory()  : void
registerMetricExporterFactory()  : void
registerResourceDetector()  : void
registerSpanExporterFactory()  : void
registerTextMapPropagator()  : void
registerTransportFactory()  : void
resourceDetector()  : ResourceDetectorInterface
resourceDetectors()  : array<int, ResourceDetectorInterface>
spanExporterFactory()  : SpanExporterFactoryInterface
textMapPropagator()  : TextMapPropagatorInterface
transportFactory()  : TransportFactoryInterface
Get transport factory registered for protocol. If $protocol contains a content-type eg `http/xyz` then only the first part, `http`, is used.

Properties

$logRecordExporterFactories

private static array<string|int, mixed> $logRecordExporterFactories = []

$metricExporterFactories

private static array<string|int, mixed> $metricExporterFactories = []

$resourceDetectors

private static array<string|int, mixed> $resourceDetectors = []

$spanExporterFactories

private static array<string|int, mixed> $spanExporterFactories = []

$textMapPropagators

private static array<string|int, mixed> $textMapPropagators = []

$transportFactories

private static array<string|int, mixed> $transportFactories = []

Methods

registerLogRecordExporterFactory()

public static registerLogRecordExporterFactory(string $exporter, LogRecordExporterFactoryInterface|LogRecordExporterFactoryInterface> $factory[, bool $clobber = false ]) : void
Parameters
$exporter : string
$factory : LogRecordExporterFactoryInterface|LogRecordExporterFactoryInterface>
$clobber : bool = false
Tags
throws
TypeError

registerMetricExporterFactory()

public static registerMetricExporterFactory(string $exporter, MetricExporterFactoryInterface|MetricExporterFactoryInterface> $factory[, bool $clobber = false ]) : void
Parameters
$exporter : string
$factory : MetricExporterFactoryInterface|MetricExporterFactoryInterface>
$clobber : bool = false
Tags
throws
TypeError

registerSpanExporterFactory()

public static registerSpanExporterFactory(string $exporter, SpanExporterFactoryInterface|SpanExporterFactoryInterface> $factory[, bool $clobber = false ]) : void
Parameters
$exporter : string
$factory : SpanExporterFactoryInterface|SpanExporterFactoryInterface>
$clobber : bool = false
Tags
throws
TypeError

registerTransportFactory()

public static registerTransportFactory(string $protocol, TransportFactoryInterface|TransportFactoryInterface> $factory[, bool $clobber = false ]) : void
Parameters
$protocol : string
$factory : TransportFactoryInterface|TransportFactoryInterface>
$clobber : bool = false
Tags
throws
TypeError

transportFactory()

Get transport factory registered for protocol. If $protocol contains a content-type eg `http/xyz` then only the first part, `http`, is used.

public static transportFactory(string $protocol) : TransportFactoryInterface
Parameters
$protocol : string
Return values
TransportFactoryInterface

        
On this page

Search results