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 85
__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 107
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 119
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 131
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 143
mixed
trace(string $name, Closure $callback, iterable $attributes = [])
Run a callback inside an internal span.
at line 182
TextMapPropagatorInterface
propagator()
Return the configured text-map propagator.
at line 192
ResponsePropagatorInterface
responsePropagator()
| internal |
Return the configured response propagator.
at line 203
array
inject(array $carrier = [], ContextInterface|null $context = null)
Inject the current or supplied context into an array carrier.
at line 215
ContextInterface
extract(array $carrier, ContextInterface|null $context = null)
Extract context from an array carrier.
at line 229
void
bind(ProcessIdentity $identity)
| internal |
Bind worker-local SDK providers to the pre-fork graph.
at line 276
bool
flush()
Flush every enabled provider.
at line 291
bool|null
flushSignals(array $signals)
| internal |
Flush selected signals without overlapping another export operation.
at line 337
bool
shutdown()
| internal |
Shut down every enabled provider and release worker-local delegates.
at line 391
bool
isBound()
| internal |
Determine whether a worker-local graph is bound.
at line 401
bool
logsEnabled()
| internal |
Determine whether the logs signal is active in this process.
at line 412
array
configuration()
| internal |
Return normalized worker configuration.
at line 422
void
extend(string $driver, Closure $factory)
Register a custom exporter driver.
Boot-only. The creator persists for the worker lifetime and must be registered before telemetry binding.
at line 433
void
enrichExceptionsUsing(Closure $enricher)
Register an exception-record enricher.
Boot-only. The callback persists for the worker lifetime and affects every reported exception.
at line 444
array
exceptionEnrichers()
| internal |
Return registered exception-record enrichers.
at line 454
void
resolveUrlTemplateUsing(Closure $resolver)
Set the outgoing URL-template resolver.
Boot-only. 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.
Boot-only. The callback persists for the worker lifetime and affects every request that collects user context.
at line 484
Closure|null
userResolver()
| internal |
Return the authenticated-user resolver.
at line 494
void
resolveCacheKeyUsing(Closure $resolver)
Set the cache-key resolver.
Boot-only. The callback persists for the worker lifetime and affects enabled cache-key capture.
at line 504
Closure|null
cacheKeyResolver()
| internal |
Return the cache-key resolver.
at line 514
void
resolveRedisQueryTextUsing(Closure $resolver)
Set the Redis query-text resolver.
Boot-only. The callback persists for the worker lifetime and affects enabled Redis query-text capture.
at line 524
Closure|null
redisQueryTextResolver()
| internal |
Return the Redis query-text resolver.
at line 532
protected void
registerInstrumentations(ProcessIdentity $identity)
Resolve and register active worker-local instrumentations.
at line 563
protected ExporterFactory
resolveExporterFactory(string $driver)
Resolve and cache an exporter factory.