class Mongo::Monitoring::Event::ServerHeartbeatFailed
Event
fired when a server heartbeat is dispatched.
@since 2.7.0
Attributes
@return [ Address
] address The server address.
@return [ Float ] round_trip_time
Duration of ismaster call in seconds.
@return [ Exception ] error The exception that occurred in ismaster call.
@return [ Exception ] error The exception that occurred in ismaster call.
@return [ Float ] round_trip_time
Duration of ismaster call in seconds.
Public Class Methods
Create the event.
@example Create the event.
ServerHeartbeatSucceeded.new(address, duration)
@param [ Address
] address The server address. @param [ Float ] round_trip_time
Duration of ismaster call in seconds. @param [ true | false ] awaited Whether the heartbeat was awaited.
@since 2.7.0 @api private
# File lib/mongo/monitoring/event/server_heartbeat_failed.rb, line 55 def initialize(address, round_trip_time, error, awaited: false) @address = address @round_trip_time = round_trip_time @error = error @awaited = !!awaited end
Public Instance Methods
@return [ true | false ] Whether the heartbeat was awaited.
# File lib/mongo/monitoring/event/server_heartbeat_failed.rb, line 40 def awaited? @awaited end
Returns a concise yet useful summary of the event.
@return [ String ] String summary of the event.
@note This method is experimental and subject to change.
@since 2.7.0 @api experimental
# File lib/mongo/monitoring/event/server_heartbeat_failed.rb, line 70 def summary "#<#{short_class_name}" + " address=#{address}" + " error=#{error.inspect}>" end