php8.5
Home/ Manual/ driver / monitoring/ The MongoDB\Driver\Monitoring\CommandStartedEvent class

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

class MongoDB\Driver\Monitoring\CommandStartedEvent { }

Properties

host

The hostname of the server that executed the command.

port

The port of the server that executed the command.

commandName

The command name.

databaseName

The database name.

command

The command document.

operationId

The operation ID. This may be used to link events together such as bulk writes, which may dispatch multiple commands.

requestId

The request ID. This may be used to associate this MongoDB\Driver\Monitoring\CommandStartedEvent with a corresponding MongoDB\Driver\Monitoring\CommandSucceededEvent or MongoDB\Driver\Monitoring\CommandFailedEvent.

serviceId

The service ID, or null if the server does not support it (i.e. not using load-balanced mode).

serverConnectionId

The server connection ID, or null if not available.

Changelog

VersionDescription
PECL mongodb 2.3.0Added public readonly properties.

Commandstartedevent

In this section

Source: reference/mongodb/mongodb/driver/monitoring/commandstartedevent.xml · from the official PHP manual (php/doc-en)