본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Correlation ID 플러그인 설정 레퍼런스

원문 보기 위키 갱신

Correlation ID 플러그인 설정 레퍼런스 (Correlation ID Plugin Configuration Reference)

이 문서는 Kong Gateway의 Correlation ID 플러그인에서 설정할 수 있는 파라미터를 하나하나 정리한 설정 레퍼런스예요. 상관관계 ID를 어떤 방식(uuid, uuid#counter, tracker)으로 생성할지, 어떤 헤더에 담을지, 클라이언트에게 다시 되돌려 보여줄지 같은 핵심 옵션의 기본값과 동작을 확인할 수 있어요. 서비스, 라우트, 컨슈머 단위로 플러그인 적용 범위를 좁히는 방법과 지원 프로토콜까지 함께 다루고 있어요. 플러그인 구성을 작성하기 전에 각 필드가 정확히 어떤 역할을 하는지 짚고 넘어가고 싶을 때 참고하면 좋아요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "echo_downstream": {
          "default": false,
          "description": "Whether to echo the header back to downstream (the client).",
          "type": "boolean"
        },
        "generator": {
          "default": "uuid#counter",
          "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).",
          "enum": [
            "tracker",
            "uuid",
            "uuid#counter"
          ],
          "type": "string"
        },
        "header_name": {
          "default": "Kong-Request-ID",
          "description": "The HTTP header name to use for the correlation ID.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "consumer": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https"
      ],
      "description": "A set of strings representing HTTP protocols.",
      "items": {
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "route": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "service": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}

관련 자료

더 알아보기 (Learn more)