OpenTelemetryManager
in package
Table of Contents
Properties
- $activeSpans : array<string|int, mixed>
- $logger : LoggerInterface
- $meter : MeterInterface
- $tracer : TracerInterface
Methods
- __construct() : mixed
- finishHttpSpan() : void
- forceFlush() : void
- getLogger() : LoggerInterface
- Get the logger instance
- getMeter() : MeterInterface
- Get the meter instance
- getTracer() : TracerInterface
- Get the tracer instance
- logEvent() : void
- recordHistogram() : void
- recordMetric() : void
- shutdown() : void
- startCacheSpan() : SpanInterface
- startDatabaseSpan() : SpanInterface
- startHttpSpan() : SpanInterface
- getRequestKey() : string
- getResponseContentLength() : int|null
Properties
$activeSpans
private
array<string|int, mixed>
$activeSpans
= []
$logger
private
LoggerInterface
$logger
$meter
private
MeterInterface
$meter
$tracer
private
TracerInterface
$tracer
Methods
__construct()
public
__construct() : mixed
finishHttpSpan()
public
finishHttpSpan(Request $request, Response $response) : void
Parameters
- $request : Request
- $response : Response
forceFlush()
public
forceFlush() : void
getLogger()
Get the logger instance
public
getLogger() : LoggerInterface
Return values
LoggerInterfacegetMeter()
Get the meter instance
public
getMeter() : MeterInterface
Return values
MeterInterfacegetTracer()
Get the tracer instance
public
getTracer() : TracerInterface
Return values
TracerInterfacelogEvent()
public
logEvent(string $message[, array<string|int, mixed> $context = [] ][, string $level = 'info' ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
- $level : string = 'info'
recordHistogram()
public
recordHistogram(string $name, float $value[, array<string|int, mixed> $attributes = [] ]) : void
Parameters
- $name : string
- $value : float
- $attributes : array<string|int, mixed> = []
recordMetric()
public
recordMetric(string $name, float $value[, array<string|int, mixed> $attributes = [] ]) : void
Parameters
- $name : string
- $value : float
- $attributes : array<string|int, mixed> = []
shutdown()
public
shutdown() : void
startCacheSpan()
public
startCacheSpan(string $operation, string $key) : SpanInterface
Parameters
- $operation : string
- $key : string
Return values
SpanInterfacestartDatabaseSpan()
public
startDatabaseSpan(string $query[, string $connection = 'default' ]) : SpanInterface
Parameters
- $query : string
- $connection : string = 'default'
Return values
SpanInterfacestartHttpSpan()
public
startHttpSpan(Request $request[, Context|null $parentContext = null ]) : SpanInterface
Parameters
- $request : Request
- $parentContext : Context|null = null
Return values
SpanInterfacegetRequestKey()
private
getRequestKey(Request $request) : string
Parameters
- $request : Request
Return values
stringgetResponseContentLength()
private
getResponseContentLength(Response $response) : int|null
Parameters
- $response : Response