Loading...
Searching...
No Matches
mongocxx::v1::events::command_failed Class Reference

`#include <mongocxx/v1/events/command_failed.hpp>`

## Description

CommandFailedEvent from the Command Logging and Monitoring specification.

See also
  - Command Logging and Monitoring (MongoDB Specifications)

## Public Member Functions

bsoncxx::v1::stdx::string_view | command_name () const
| Return the command name.
std::int64_t | duration () const
| Return the execution time of the event.
bsoncxx::v1::document::view | failure () const
| Return the failure document.
bsoncxx::v1::stdx::string_view | host () const
| Return the hostname for the connection used by the command.
std::int64_t | operation_id () const
| Return the client-generated operation ID.
std::uint16_t | port () const
| Return the port number for the connection used by the command.
std::int64_t | request_id () const
| Return the client-generated request ID.
bsoncxx::v1::stdx::optional< bsoncxx::v1::oid > | service_id () const
| Return the service ID for the command (when in load balancer mode).

## Member Function Documentation

## command_name()

bsoncxx::v1::stdx::string_view mongocxx::v1::events::command_failed::command_name | ( |  | ) | const

Return the command name.

## duration()

std::int64_t mongocxx::v1::events::command_failed::duration | ( |  | ) | const

Return the execution time of the event.

## failure()

bsoncxx::v1::document::view mongocxx::v1::events::command_failed::failure | ( |  | ) | const

Return the failure document.

## host()

bsoncxx::v1::stdx::string_view mongocxx::v1::events::command_failed::host | ( |  | ) | const

Return the hostname for the connection used by the command.

## operation_id()

std::int64_t mongocxx::v1::events::command_failed::operation_id | ( |  | ) | const

Return the client-generated operation ID.

## port()

std::uint16_t mongocxx::v1::events::command_failed::port | ( |  | ) | const

Return the port number for the connection used by the command.

## request_id()

std::int64_t mongocxx::v1::events::command_failed::request_id | ( |  | ) | const

Return the client-generated request ID.

## service_id()

bsoncxx::v1::stdx::optional< bsoncxx::v1::oid > mongocxx::v1::events::command_failed::service_id | ( |  | ) | const

Return the service ID for the command (when in load balancer mode).

The documentation for this class was generated from the following file:

- mongocxx/v1/events/command_failed.hpp