module Sentry::Metrics

def count(name, value: 1, attributes: nil)

Returns:
  • (void) -

Parameters:
  • attributes (Hash, nil) -- additional attributes for the metric (optional)
  • value (Numeric) -- the value to increment by (default: 1)
  • name (String) -- the metric name
def count(name, value: 1, attributes: nil)
  return unless Sentry.initialized?
  Sentry.get_current_hub.capture_metric(
    name: name,
    type: :counter,
    value: value,
    attributes: attributes
  )
end