MongoDB\Driver\Monitoring\addSubscriber
(mongodb >=1.3.0)
MongoDB\Driver\Monitoring\addSubscriber — Registers a new monitoring event subscriber
説明
MongoDB\Driver\Monitoring\addSubscriber
( MongoDB\Driver\Monitoring\Subscriber
$subscriber
) : voidRegisters a new monitoring event subscriber with the driver. Registered subscribers will be notified of monitoring events through specific methods.
注意: If the object is already registered, this function is a no-op.
パラメータ
-
subscriber(MongoDB\Driver\Monitoring\Subscriber) -
A monitoring event subscriber object to register.
返り値
値を返しません。
エラー / 例外
- 引数のパースに失敗した場合に MongoDB\Driver\Exception\InvalidArgumentException をスローします。
参考
- MongoDB\Driver\Monitoring\Subscriber
- MongoDB\Driver\Monitoring\CommandSubscriber
- MongoDB\Driver\Monitoring\removeSubscriber() - Unregisters an existing monitoring event subscriber
- Application Performance Monitoring (APM)