Kamon icon indicating copy to clipboard operation
Kamon copied to clipboard

Pekko Http custom tags for http metrics

Open javimartinez opened this issue 5 months ago • 0 comments

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.

javimartinez avatar Aug 12 '25 14:08 javimartinez