class Honeybadger::Breadcrumbs::Breadcrumb
Attributes
Raw breadcrumb data structure
Raw breadcrumb data structure
Public Class Methods
Source
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 13 def initialize(category: "custom", message: nil, metadata: {}) @active = true @timestamp = Time.now.utc @category = category @message = message @metadata = metadata.is_a?(Hash) ? metadata : {} end
Public Instance Methods
Source
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 31 def <=>(other) to_h <=> other.to_h end
Source
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 40 def active? @active end
Is the Breadcrumb
active or not. Inactive Breadcrumbs
not be included with any outgoing payloads.
@return [Boolean]
Source
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 47 def ignore! @active = false self end
Sets the breadcrumb to inactive
@return self
Source
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 22 def to_h { category: category, message: message, metadata: metadata, timestamp: timestamp.iso8601(3) } end