class Honeybadger::Breadcrumbs::Breadcrumb
Attributes
active[RW]
category[R]
Raw breadcrumb data structure
message[RW]
metadata[RW]
timestamp[R]
Raw breadcrumb data structure
Public Class Methods
new(category: "custom", message: nil, metadata: {})
click to toggle 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
<=>(other)
click to toggle source
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 31 def <=>(other) to_h <=> other.to_h end
active?()
click to toggle source
Is the Breadcrumb
active or not. Inactive Breadcrumbs
not be included with any outgoing payloads.
@return [Boolean]
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 40 def active? @active end
ignore!()
click to toggle source
Sets the breadcrumb to inactive
@return self
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 47 def ignore! @active = false self end
to_h()
click to toggle source
# File lib/honeybadger/breadcrumbs/breadcrumb.rb, line 22 def to_h { category: category, message: message, metadata: metadata, timestamp: timestamp.iso8601(3) } end