Method: Mongo::Monitoring::Event::CommandFailed#initialize
- Defined in:
- lib/mongo/monitoring/event/command_failed.rb
#initialize(command_name, database_name, address, request_id, operation_id, message, failure, duration, started_event:, server_connection_id: nil, service_id: nil) ⇒ CommandFailed
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create the new event.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/mongo/monitoring/event/command_failed.rb', line 85 def initialize(command_name, database_name, address, request_id, operation_id, , failure, duration, started_event:, server_connection_id: nil, service_id: nil ) @command_name = command_name.to_s @database_name = database_name @address = address @request_id = request_id @operation_id = operation_id @service_id = service_id @message = @started_event = started_event @failure = redacted(command_name, failure) @duration = duration @server_connection_id = server_connection_id end |