Method: Sentry::Client#event_from_check_in

Defined in:
lib/sentry/client.rb

#event_from_check_in(slug, status, hint = {}, duration: nil, monitor_config: nil, check_in_id: nil) ⇒ Event

Initializes a CheckInEvent object with the given options.

Parameters:

  • slug (String)

    identifier of this monitor

  • status (Symbol)

    status of this check-in, one of Sentry::CheckInEvent::VALID_STATUSES

  • hint (Hash) (defaults to: {})

    the hint data that’ll be passed to before_send callback and the scope’s event processors.

  • duration (Integer, nil) (defaults to: nil)

    seconds elapsed since this monitor started

  • monitor_config (Cron::MonitorConfig, nil) (defaults to: nil)

    configuration for this monitor

  • check_in_id (String, nil) (defaults to: nil)

    for updating the status of an existing monitor

Returns:



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/sentry/client.rb', line 184

def event_from_check_in(
  slug,
  status,
  hint = {},
  duration: nil,
  monitor_config: nil,
  check_in_id: nil
)
  return unless configuration.sending_allowed?

  CheckInEvent.new(
    configuration: configuration,
    integration_meta: Sentry.integrations[hint[:integration]],
    slug: slug,
    status: status,
    duration: duration,
    monitor_config: monitor_config,
    check_in_id: check_in_id
  )
end