java-dogstatsd-client icon indicating copy to clipboard operation
java-dogstatsd-client copied to clipboard

sending metrics inside of scala execution context will not work

Open senyan opened this issue 5 years ago • 0 comments

 Telemetry.qc_success(1, "test1")
    val futures = datasets.map( (ds) => {
      Telemetry.qc_success(1, "test2")
      val future = Future {
      Telemetry.qc_success(1, "test3")
        blocking{
      Telemetry.qc_success(1, "test4")
          actualCode()
        }
      }
      Telemetry.qc_success(1 "test5")
      future
    }).map( (x) => {
      Telemetry.qc_success(1, "test6")
      Await.result(x, 2 hours)
      Telemetry.qc_success(1, "test7")
    })
    Telemetry.qc_success(1, "test8")

In the above code, only test1, test2 and test8 will be successfully sent. Seems anything inside of scala execution context will not work.

senyan avatar Jun 01 '19 23:06 senyan