Skip to content

Pekko Http custom tags for http metrics #1405

@javimartinez

Description

@javimartinez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions