I'd like to add a custom tag dynamically when the code of a http route is executed. I tried the following:
Kamon.runWithContext(Kamon.currentContext().withTag("newTag", "newValue")) {
path("ping") {
get {
val response = PingResponse("ping", System.currentTimeMillis())
complete(StatusCodes.OK, response)
}
}}
but it doesn't seem to work. Perhaps this is not posible, any advice on this?
Thank you.