The MongoDB\Driver\Monitoring\CommandStartedEvent class
The MongoDB\Driver\Monitoring\CommandStartedEvent class encapsulates information about a started command.
Intro
The MongoDB\Driver\Monitoring\CommandStartedEvent class encapsulates information about a started command.
Class synopsis
Properties
hostThe hostname of the server that executed the command.
portThe port of the server that executed the command.
commandNameThe command name.
databaseNameThe database name.
commandThe command document.
operationIdThe operation ID. This may be used to link events together such as bulk writes, which may dispatch multiple commands.
requestIdThe request ID. This may be used to associate this
MongoDB\Driver\Monitoring\CommandStartedEventwith a correspondingMongoDB\Driver\Monitoring\CommandSucceededEventorMongoDB\Driver\Monitoring\CommandFailedEvent.serviceIdThe service ID, or null if the server does not support it (i.e. not using load-balanced mode).
serverConnectionIdThe server connection ID, or null if not available.
Changelog
| Version | Description |
|---|---|
| PECL mongodb 2.3.0 | Added public readonly properties. |
Commandstartedevent