def start(config)
      if (reason = should_skip?(config))
        unless config.disable_start_message?
          config.alert_logger.info "Skipping because: #{reason}. " \
            "Start manually with `ElasticAPM.start'"
        end
        return
      end

      ElasticAPM.start(config).tap do |agent|
        attach_subscriber(agent)
      end
    rescue StandardError => e
      config.alert_logger.error format('Failed to start: %s', e.message)
      config.alert_logger.debug "Backtrace:\n" + e.backtrace.join("\n")
    end
def start(config)
      if (reason = should_skip?(config))
        unless config.disable_start_message?
          config.alert_logger.info "Skipping because: #{reason}. " \
            "Start manually with `ElasticAPM.start'"
        end
        return
      end

      ElasticAPM.start(config).tap do |agent|
        attach_subscriber(agent)
      end
    rescue StandardError => e
      config.alert_logger.error format('Failed to start: %s', e.message)
      config.alert_logger.debug "Backtrace:\n" + e.backtrace.join("\n")
    end
rubocop:disable Metrics/MethodLength, Metrics/AbcSize