OpenTelemetryManager
class OpenTelemetryManager
Properties
| protected Closure> | $customCreators | ||
| protected ExporterFactory> | $exporterFactories | ||
| protected Closure> | $exceptionEnrichers | ||
| protected Closure|null | $urlTemplateResolver | ||
| protected Closure|null | $userResolver | ||
| protected Closure|null | $cacheKeyResolver | ||
| protected Closure|null | $redisQueryTextResolver | ||
| protected ProviderSet|null | $providers | ||
| protected ProcessIdentity|null | $identity | ||
| protected array<string, mixed> | $normalizedConfiguration | ||
| protected bool | $bound | ||
| protected bool | $closed | ||
| protected bool | $flushing | ||
| protected bool | $closing | ||
| protected Channel|null | $flushCompletion |
Methods
Create a new OpenTelemetry manager.
Return a meter for an instrumentation scope.
Return a tracer for an instrumentation scope.
Return a logger for an instrumentation scope.
Return the configured text-map propagator.
Return the configured response propagator.
Inject the current or supplied context into an array carrier.
Extract context from an array carrier.
Flush every enabled provider.
Flush selected signals without overlapping another export operation.
Shut down every enabled provider and release worker-local delegates.
Determine whether a worker-local graph is bound.
Determine whether the logs signal is active in this process.
Return normalized worker configuration.
Return registered exception-record enrichers.
Return the outgoing URL-template resolver.
Return the authenticated-user resolver.
Return the cache-key resolver.
Return the Redis query-text resolver.
Resolve and register active worker-local instrumentations.
Resolve and cache an exporter factory.
Details
at line 87
__construct(Container $container, Repository $config, ConfigurationNormalizer $normalizer, ProviderFactory $providerFactory, ExceptionContextRegistry $exceptionContexts, OperationOrigin $origins, MeterProviderInterface $meterProvider, TracerProviderInterface $tracerProvider, LoggerProviderInterface $loggerProvider, DeferredMeterProvider|null $deferredMeterProvider, DeferredTracerProvider|null $deferredTracerProvider, DeferredLoggerProvider|null $deferredLoggerProvider, TextMapPropagatorInterface $textMapPropagator, ResponsePropagatorInterface $responsePropagator, bool $enabled)
Create a new OpenTelemetry manager.
at line 109
MeterInterface
meter(string $name = 'hypervel.application', string|null $version = null, string|null $schemaUrl = null, iterable $attributes = [])
Return a meter for an instrumentation scope.
at line 121
TracerInterface
tracer(string $name = 'hypervel.application', string|null $version = null, string|null $schemaUrl = null, iterable $attributes = [])
Return a tracer for an instrumentation scope.
at line 133
LoggerInterface
logger(string $name = 'hypervel.application', string|null $version = null, string|null $schemaUrl = null, iterable $attributes = [])
Return a logger for an instrumentation scope.
at line 145
mixed
trace(string $name, Closure $callback, iterable $attributes = [])
Run a callback inside an internal span.
at line 179
TextMapPropagatorInterface
propagator()
Return the configured text-map propagator.
at line 189
ResponsePropagatorInterface
responsePropagator()
| internal |
Return the configured response propagator.
at line 200
array
inject(array $carrier = [], ContextInterface|null $context = null)
Inject the current or supplied context into an array carrier.
at line 212
ContextInterface
extract(array $carrier, ContextInterface|null $context = null)
Extract context from an array carrier.
at line 226
void
bind(ProcessIdentity $identity)
| internal |
Bind worker-local SDK providers to the pre-fork graph.
at line 273
bool
flush()
Flush every enabled provider.
at line 288
bool|null
flushSignals(array $signals)
| internal |
Flush selected signals without overlapping another export operation.
at line 334
bool
shutdown()
| internal |
Shut down every enabled provider and release worker-local delegates.
at line 388
bool
isBound()
| internal |
Determine whether a worker-local graph is bound.
at line 398
bool
logsEnabled()
| internal |
Determine whether the logs signal is active in this process.
at line 409
array
configuration()
| internal |
Return normalized worker configuration.
at line 419
void
extend(string $driver, Closure $factory)
Register a custom exporter driver.
On the shared manager, the creator persists for the worker lifetime and must be registered before telemetry binding.
at line 431
void
enrichExceptionsUsing(Closure $enricher)
Register an exception-record enricher.
On the shared manager, the callback persists for the worker lifetime and affects every reported exception.
at line 443
array
exceptionEnrichers()
| internal |
Return registered exception-record enrichers.
at line 453
void
resolveUrlTemplateUsing(Closure $resolver)
Set the outgoing URL-template resolver.
On the shared manager, the callback persists for the worker lifetime and affects every traced outgoing request.
at line 464
Closure|null
urlTemplateResolver()
| internal |
Return the outgoing URL-template resolver.
at line 474
void
resolveUserUsing(Closure $resolver)
Set the authenticated-user resolver.
On the shared manager, the callback persists for the worker lifetime and affects every request that collects user context.
at line 485
Closure|null
userResolver()
| internal |
Return the authenticated-user resolver.
at line 495
void
resolveCacheKeyUsing(Closure $resolver)
Set the cache-key resolver.
On the shared manager, the callback persists for the worker lifetime and affects enabled cache-key capture.
at line 506
Closure|null
cacheKeyResolver()
| internal |
Return the cache-key resolver.
at line 516
void
resolveRedisQueryTextUsing(Closure $resolver)
Set the Redis query-text resolver.
On the shared manager, the callback persists for the worker lifetime and affects enabled Redis query-text capture.
at line 527
Closure|null
redisQueryTextResolver()
| internal |
Return the Redis query-text resolver.
at line 535
protected void
registerInstrumentations(ProcessIdentity $identity)
Resolve and register active worker-local instrumentations.
at line 566
protected ExporterFactory
resolveExporterFactory(string $driver)
Resolve and cache an exporter factory.