class Honeybadger::Backend::Base
Attributes
Public Class Methods
Source
# File lib/honeybadger/backend/base.rb, line 76 def initialize(config) @config = config end
Public Instance Methods
Source
# File lib/honeybadger/backend/base.rb, line 99 def check_in(id) raise NotImplementedError, 'must define #check_in on subclass.' end
Does a check in using the input id.
@param [String] id The unique check_in
id.
@raise NotImplementedError
Source
# File lib/honeybadger/backend/base.rb, line 118 def event(payload) raise NotImplementedError, "must define #event on subclass" end
Send event @example backend.event([{event_type: “email_received”, ts: “2023-03-04T12:12:00+1:00”, subject: ‘Re: Aquisition’ }})
@param [Array] payload array of event hashes to send @raise NotImplementedError
Source
# File lib/honeybadger/backend/base.rb, line 90 def notify(feature, payload) raise NotImplementedError, 'must define #notify on subclass.' end
Process payload for feature.
@example backend.notify(:notices, Notice.new(...)
)
@param [Symbol] feature The feature name (corresponds to HTTP endpoint). Current options are: ‘:notices`, `:deploys`, `:ping`. @param [#to_json] payload The JSON payload to send.
@raise NotImplementedError
Source
# File lib/honeybadger/backend/base.rb, line 108 def track_deployment(payload) notify(:deploys, payload) end
Track a deployment @example backend.track_deployment({ revision: ‘be2ceb6’ })
@param [#to_json] payload The JSON payload containing all deployment data.