def getInstance()

in src/main/scala/com/gu/kinesis/ConsumerStats.scala [33:42]


  def getInstance(config: Config): ConsumerStats = {
    try {
      val className = config.getString("com.gu.kinesis.consumer.stats-class-name")
      Class.forName(className).getDeclaredConstructor().newInstance().asInstanceOf[ConsumerStats]
    } catch {
      case NonFatal(e) =>
        log.error("Could not load a `ConsumerStats` instance, falling back to `NoopConsumerStats`.", e)
        new NoopConsumerStats
    }
  }