MongoDB\Driver\Monitoring\CommandSubscriber::commandStarted

Notification method for a started command

&reftitle.description; abstract public `void` `MongoDB\Driver\Monitoring\CommandSubscriber::commandStarted` `MongoDB\Driver\Monitoring\CommandStartedEvent` `event`

If the subscriber is registered, this method is called when a command is sent to the server.

&reftitle.parameters;

`event` (`MongoDB\Driver\Monitoring\CommandStartedEvent`)

- An event object encapsulating information about the started command.

&reftitle.returnvalues;

&return.void;

&reftitle.errors;

&mongodb.throws.argumentparsing;

&reftitle.seealso;

- `MongoDB\Driver\Monitoring\CommandStartedEvent`
- `MongoDB\Driver\Monitoring\addSubscriber`
- `MongoDB\Driver\Manager::addSubscriber`
- mongodb.tutorial.apm