allancochrane
10/13/2017, 8:00 PM@RequestMapping("/concurrent1")
fun endPoint1() : String {
<http://log.info|log.info>("/concurrent1")
var s = ""
runBlocking {
val a = urls.map { url ->
<http://log.info|log.info>(url)
async(CommonPool) {
restTemplate.getForObject(url, String::class.java)
}
}
val b = a.map { it.await() }
s = b.joinToString { "" }
}
return s
}
records a unique trace for each HTTP call when sent to a Zipkin server. I suspect it’s something to do with coroutines running in a separate thread from the main thread.