RuntimeInstrumentation
class RuntimeInstrumentation extends AbstractInstrumentation
Constants
| protected MEMORY_METRICS |
|
| protected GARBAGE_COLLECTION_METRICS |
|
| protected CPU_METRICS |
|
| protected OPCACHE_METRICS |
|
| protected SERVER_METRICS |
|
| protected WORKER_METRICS |
|
| protected COROUTINE_METRICS |
|
Properties
| protected InstrumentationOptions | $options | from AbstractInstrumentation |
Methods
Register the instrumentation with normalized options.
Register runtime instruments and collection callbacks.
Determine whether a metric is enabled.
Index callback observers by their matching instrument name.
Create runtime instrumentation.
Return enabled names from one snapshot group.
Register one batched snapshot callback.
Create one observable runtime instrument.
Observe process memory metrics.
Observe garbage collection metrics.
Observe process CPU metrics.
Observe shared OPcache metrics.
Observe shared server and current-worker metrics.
Observe current-worker coroutine metrics.
Details
in
AbstractInstrumentation at line 18
final void
register(array $options)
Register the instrumentation with normalized options.
at line 82
protected void
registerInstrumentation()
Register runtime instruments and collection callbacks.
in
AbstractInstrumentation at line 32
protected bool
tracesEnabled()
Determine whether trace output is enabled.
in
AbstractInstrumentation at line 40
protected bool
metricEnabled(string $name)
Determine whether a metric is enabled.
in
AbstractInstrumentation at line 55
protected array
indexObservers(array $names, array $observers)
Index callback observers by their matching instrument name.
The SDK supplies observers in the same order as the instruments passed to batchObserve(), so the unchanged name order is the mapping contract.
at line 72
__construct(Container $container, MeterProviderInterface $meterProvider, ProcessIdentity $processIdentity)
Create runtime instrumentation.
at line 148
protected array
enabledMetrics(array $names)
Return enabled names from one snapshot group.
at line 162
protected void
registerBatch(MeterInterface $meter, array $names, Closure $callback)
Register one batched snapshot callback.
at line 185
protected AsynchronousInstrument
createInstrument(MeterInterface $meter, string $name)
Create one observable runtime instrument.
at line 337
protected void
observeMemory(array $observers)
Observe process memory metrics.
at line 367
protected void
observeGarbageCollection(array $observers)
Observe garbage collection metrics.
at line 392
protected void
observeCpu(array $observers)
Observe process CPU metrics.
at line 439
protected void
observeOpcache(array $observers)
Observe shared OPcache metrics.
at line 471
protected void
observeServer(Server $server, array $observers)
Observe shared server and current-worker metrics.
at line 496
protected void
observeCoroutines(array $observers)
Observe current-worker coroutine metrics.