assemblyMergeStrategy in assembly := { casePathList("META-INF", xs@_*) => MergeStrategy.discard case"application.conf" => MergeStrategy.concat case x => val oldStrategy = (assemblyMergeStrategy in assembly).value oldStrategy(x) }
val bgThread = newThread(() => { defrandExporters(): Unit = { while (true) try { counter.inc(something(0, 5)) println("counter value now is: " + counter.get()) gauge.set(something(-5, 10)) histogram.observe(something(0, 5)) summary.observe(something(0, 5)) Thread.sleep(1000) } catch { case e: InterruptedException => e.printStackTrace() } }
randExporters() })
bgThread.start() try { val server = newHTTPServer(9090) println(s"server start at port ${server.getPort}") } catch { case e: IOException => e.printStackTrace() } } }