Generate a single UUID on a per-worker basis

Generates a single UUID on a per-worker basis and the requests append a counter to the UUID after a # character.

Environment variables

  • KONG-REQUEST-ID: The HTTP header name to use for the correlation ID.

  • uuid#counter: The generator to use for the correlation ID. Accepted values are uuid, uuid#counter, and tracker.

  • false: Whether to echo the header back to downstream (the client).

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: correlation-id
    config:
      header_name: Kong-Request-ID
      generator: uuid#counter
      echo_downstream: false
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!