Method: Honeybadger::Agent#add_breadcrumb
- Defined in:
- lib/honeybadger/agent.rb
permalink #add_breadcrumb(message, metadata: {}, category: "custom") ⇒ Object
Appends a breadcrumb to the trace. Use this when you want to add some custom data to your breadcrumb trace in effort to help debugging. If a notice is reported to Honeybadger, all breadcrumbs within the execution path will be appended to the notice. You will be able to view the breadcrumb trace in the Honeybadger interface to see what events led up to the notice.
324 325 326 327 328 329 330 331 332 333 334 |
# File 'lib/honeybadger/agent.rb', line 324 def (, metadata: {}, category: "custom") params = Util::Sanitizer.new(max_depth: 2).sanitize({ category: category, message: , metadata: }) .add!(Breadcrumbs::Breadcrumb.new(**params)) self end |