Skip to content
Discussion options

You must be logged in to vote

OK I found a way to change the span name with a post-function plugin. Commenting that here if somebody needs it:

name: post-function
enabled: true
config:
  access:
    - |
      local root_span = kong.tracing.active_span()
      -- Retrieve the HTTP method and path from the request
      local method = kong.request.get_method()
      local path = kong.request.get_path()
      -- Set the span name using the method and path
      root_span.name = method .. " " .. path

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@AhmedAhmedEG
Comment options

@AhmedAhmedEG
Comment options

@AhmedAhmedEG
Comment options

@AhmedAhmedEG
Comment options

Answer selected by rajshrestha86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants