You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: metrics_listener.rb
    path of file: ./repos/karafka/lib/karafka/instrumentation/vendors/appsignal
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative 'base'

module Karafka
  module Instrumentation
    module Vendors
      # Namespace for Appsignal instrumentation
      module Appsignal
        # Listener that ships metrics to Appsignal
       
    
          def on_error_occurred(event)
            # If this is a user consumption related error, we bump the counters for metrics
            if USER_CONSUMER_ERROR_TYPES.include?(event[:type])
              consumer = event.payload[:caller]

              with_multiple_resolutions(consumer) do |tags|
                count('consumer_errors', 1, tags)
              end
            end