Class: Mongo::Monitoring::Event::CommandFailed
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Mongo::Event::Base
|
|
Instance Chain:
self,
Secure ,
::Mongo::Event::Base
|
|
Inherits: |
Mongo::Event::Base
|
Defined in: | lib/mongo/monitoring/event/command_failed.rb |
Overview
::Mongo::Monitoring::Event
that is fired when a command operation fails.
Constant Summary
Secure
- Included
Class Method Summary
-
.generate(address, operation_id, payload, message, failure, duration, started_event:, server_connection_id: nil, service_id: nil) ⇒ CommandFailed
Internal use only
Internal use only
Create the event from a wire protocol message payload.
-
.new(command_name, database_name, address, request_id, operation_id, message, failure, duration, started_event:, server_connection_id: nil, service_id: nil) ⇒ CommandFailed
constructor
Internal use only
Internal use only
Create the new event.
Instance Attribute Summary
- #address ⇒ Server::Address readonly
- #command_name ⇒ String readonly
- #database_name ⇒ String readonly
- #duration ⇒ Float readonly
- #failure ⇒ BSON::Document readonly
- #message ⇒ String readonly
- #operation_id ⇒ Integer readonly
- #request_id ⇒ Integer readonly
- #server_connection_id ⇒ Integer readonly
- #service_id ⇒ nil | Object readonly
- #started_event ⇒ Monitoring::Event::CommandStarted readonly Internal use only Internal use only
Instance Method Summary
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Secure
- Included
#compression_allowed? | Is compression allowed for a given command message. |
#redacted | Redact secure information from the document if: |
#sensitive? | Check whether the command is sensitive in terms of command monitoring spec. |
::Mongo::Event::Base
- Inherited
#summary | Returns a concise yet useful summary of the event. |
#short_class_name |
Class Method Details
.generate(address, operation_id, payload, message, failure, duration, started_event:, server_connection_id: nil, service_id: nil) ⇒ CommandFailed
This method is for internal use only.
Create the event from a wire protocol message payload.
# File 'lib/mongo/monitoring/event/command_failed.rb', line 132
def self.generate(address, operation_id, payload, , failure, duration, started_event:, server_connection_id: nil, service_id: nil ) new( payload[:command_name], payload[:database_name], address, payload[:request_id], operation_id, , failure, duration, started_event: started_event, server_connection_id: server_connection_id, service_id: service_id, ) end
Instance Attribute Details
#address ⇒ Server::Address
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 29
attr_reader :address
#command_name ⇒ String
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 32
attr_reader :command_name
#database_name ⇒ String
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 35
attr_reader :database_name
#duration ⇒ Float
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 38
attr_reader :duration
#failure ⇒ BSON::Document
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 44
attr_reader :failure
#message ⇒ String
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 48
attr_reader :
#operation_id ⇒ Integer
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 51
attr_reader :operation_id
#request_id ⇒ Integer
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 54
attr_reader :request_id
#server_connection_id ⇒ Integer
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 57
attr_reader :server_connection_id
#service_id ⇒ nil
| Object
(readonly)
# File 'lib/mongo/monitoring/event/command_failed.rb', line 60
attr_reader :service_id
#started_event ⇒ Monitoring::Event::CommandStarted (readonly)
This method is for internal use only.
# File 'lib/mongo/monitoring/event/command_failed.rb', line 66
attr_reader :started_event
Instance Method Details
#summary ⇒ String
Note:
This method is experimental and subject to change.
Returns a concise yet useful summary of the event.
# File 'lib/mongo/monitoring/event/command_failed.rb', line 109
def summary "#<#{short_class_name} address=#{address} #{database_name}.#{command_name}>" end