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
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
logRecordExporterFactory()
public
static logRecordExporterFactory(string $exporter) : LogRecordExporterFactoryInterface
Parameters
- $exporter : string
Return values
LogRecordExporterFactoryInterfacemetricExporterFactory()
public
static metricExporterFactory(string $exporter) : MetricExporterFactoryInterface
Parameters
- $exporter : string
Return values
MetricExporterFactoryInterfaceregisterLogRecordExporterFactory()
public
static registerLogRecordExporterFactory(string $exporter, LogRecordExporterFactoryInterface|LogRecordExporterFactoryInterface> $factory[, bool $clobber = false ]) : void
Parameters
- $exporter : string
- $factory : LogRecordExporterFactoryInterface|LogRecordExporterFactoryInterface>
- $clobber : bool = false
Tags
registerMetricExporterFactory()
public
static registerMetricExporterFactory(string $exporter, MetricExporterFactoryInterface|MetricExporterFactoryInterface> $factory[, bool $clobber = false ]) : void
Parameters
- $exporter : string
- $factory : MetricExporterFactoryInterface|MetricExporterFactoryInterface>
- $clobber : bool = false
Tags
registerResourceDetector()
public
static registerResourceDetector(string $name, ResourceDetectorInterface $detector) : void
Parameters
- $name : string
- $detector : ResourceDetectorInterface
registerSpanExporterFactory()
public
static registerSpanExporterFactory(string $exporter, SpanExporterFactoryInterface|SpanExporterFactoryInterface> $factory[, bool $clobber = false ]) : void
Parameters
- $exporter : string
- $factory : SpanExporterFactoryInterface|SpanExporterFactoryInterface>
- $clobber : bool = false
Tags
registerTextMapPropagator()
public
static registerTextMapPropagator(string $name, TextMapPropagatorInterface $propagator[, bool $clobber = false ]) : void
Parameters
- $name : string
- $propagator : TextMapPropagatorInterface
- $clobber : bool = false
registerTransportFactory()
public
static registerTransportFactory(string $protocol, TransportFactoryInterface|TransportFactoryInterface> $factory[, bool $clobber = false ]) : void
Parameters
- $protocol : string
- $factory : TransportFactoryInterface|TransportFactoryInterface>
- $clobber : bool = false
Tags
resourceDetector()
public
static resourceDetector(string $name) : ResourceDetectorInterface
Parameters
- $name : string
Return values
ResourceDetectorInterfaceresourceDetectors()
public
static resourceDetectors() : array<int, ResourceDetectorInterface>
Return values
array<int, ResourceDetectorInterface>spanExporterFactory()
public
static spanExporterFactory(string $exporter) : SpanExporterFactoryInterface
Parameters
- $exporter : string
Return values
SpanExporterFactoryInterfacetextMapPropagator()
public
static textMapPropagator(string $name) : TextMapPropagatorInterface
Parameters
- $name : string
Return values
TextMapPropagatorInterfacetransportFactory()
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